This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] TMS320F28379D:TMS320F28379D:Sinc3滤波器错误样片概览(续)

Guru**** 1838140 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1426165/tms320f28379d-tms320f28379d-walkaround-for-sinc3-filter-incorrect-samples-continued

器件型号:TMS320F28379D

工具与软件:

您好、 

我还有一个澄清,我不是 AB ; e 张贴在上一个线程,

如果读取的数据如下所示:

滤波器稳定时间/延迟在哪里? 我们是否仅在运行时启用/禁用主滤波器时才需要担心延迟?

考虑以下示例:

OSR:200、使用滤波器、数据速率为20微秒。

假设 只有在20微秒后才设置通道数据确认中断、我是否正确?我是否还 需要将此数据视为" 无效的任何错误 "数据、还是我需要等待60微秒?

这是我尝试使用 确认中断读取数据的方式、您能否告诉我读取数据的正确时间:

  • 首先在 PWM ISR 中:我启用 SDFM 确认中断
  • 在 SDFM ISR 中、 我检查是否存在相同的 SDFM 确认标志、如果设置了该标志、则从数据过滤器读取数据
  • 然后我禁用 正常通道确认中断。
  • 此外、当  调用 PWM ISR 时、将重复相同的过程。

我还试图测量到 SDFM 模块设置确认位的时间(比如下面的 testTCBR1, testTCBR1 ),我预计它是20微秒,但它似乎不是恒定的,它不断地从大约1微秒变化到18微秒。-->这是预期的行为。 我的印象是,它将不断地20微秒

__interrupt void pwm11_ISR(void)
{
    runControl();
	
	//pwm is configured with up-down counter mode.
	//pwm ISR is triggered if TCBR is 0.
	//so 0 to 2500 and back to 0. This is 50 microseconds(1 pwm cycle)
	//0 to 2500 is 25 microseconds.(half pwm cycle)
	//So (testTCBR2 - testTCBR1) * (25/2500) is the time difference (in microseconds) between testTCBR2 and testTCBR1.
    testTCBR1 = EPWM_getTimeBaseCounterValue(EPWM11_BASE);	//log the start time
	
    SDFM_enableInterrupt(SDFM2_BASE, SDFM_FILTER_1, SDFM_DATA_FILTER_ACKNOWLEDGE_INTERRUPT);
    SDFM_enableInterrupt(SDFM2_BASE, SDFM_FILTER_2, SDFM_DATA_FILTER_ACKNOWLEDGE_INTERRUPT);
    SDFM_enableInterrupt(SDFM2_BASE, SDFM_FILTER_3, SDFM_DATA_FILTER_ACKNOWLEDGE_INTERRUPT);

    // Acknowledges the interrupt
    HAL_ackInt_M1(halMtrHandle[MTR_1]);
}

__interrupt void M1_INT_SDFM1_ISR(void)
{
    AMC1303Vars[0].SDFMCounter++;

    if(SDFM_getNewFilterDataStatus(SDFM2_BASE, SDFM_FILTER_1))
    {
		testTCBR2 = EPWM_getTimeBaseCounterValue(EPWM11_BASE);	//log end time 
		AMC1303Vars[0].rawfilter2Result = (int16_t) (SDFM_getFilterData(SDFM2_BASE, SDFM_FILTER_1) >> 16U);   //phase u
		SDFM_clearInterruptFlag(SDFM2_BASE, (SDFM_MASTER_INTERRUPT_FLAG | SDFM_FILTER_1_NEW_DATA_FLAG));
        SDFM_disableInterrupt(SDFM2_BASE, SDFM_FILTER_1, SDFM_DATA_FILTER_ACKNOWLEDGE_INTERRUPT);
    }

    if(SDFM_getNewFilterDataStatus(SDFM2_BASE, SDFM_FILTER_2))
    {
        AMC1303Vars[0].rawfilter2Result = (int16_t) (SDFM_getFilterData(SDFM2_BASE, SDFM_FILTER_2) >> 16U);   //phase v
        SDFM_clearInterruptFlag(SDFM2_BASE, (SDFM_MASTER_INTERRUPT_FLAG | SDFM_FILTER_2_NEW_DATA_FLAG));
        SDFM_disableInterrupt(SDFM2_BASE, SDFM_FILTER_2, SDFM_DATA_FILTER_ACKNOWLEDGE_INTERRUPT);
    }

    if(SDFM_getNewFilterDataStatus(SDFM2_BASE, SDFM_FILTER_3))
    {
        AMC1303Vars[0].rawfilter3Result = (int16_t) (SDFM_getFilterData(SDFM2_BASE, SDFM_FILTER_3) >> 16U);   //phase w
        SDFM_clearInterruptFlag(SDFM2_BASE, (SDFM_MASTER_INTERRUPT_FLAG | SDFM_FILTER_3_NEW_DATA_FLAG));
        SDFM_disableInterrupt(SDFM2_BASE, SDFM_FILTER_3, SDFM_DATA_FILTER_ACKNOWLEDGE_INTERRUPT);
    }

    Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP5);
}

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好!

    很抱歉耽误你的时间。

    我不确定您在其他线程中发布的问题是什么、但  SDFM 模块设置了确认位的时间应该是恒定的。

    此致、

    哈迪

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    这种 dosnt 似乎正在发生,另一个观察,与较低的 DOSR,(在32到50之间), 这个时间似乎是恒定的,但随着我增加 OSR 的时间似乎是 oscilate。 从几纳秒到几微秒不等。 不管怎样、您可以关闭该主题、我再做一些说明、您可以 在这里继续介绍