工具与软件:
我还有一个澄清,我不是 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);
}