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.

[参考译文] TMS320F280041C:MotorControl SDK Timer0中断

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1471167/tms320f280041c-motorcontrol-sdk-timer0-interrupt

器件型号:TMS320F280041C

工具与软件:

您好! 我想将 Timer0 (或 Timer1或 Timer2)与 MotorControl SDK 一起使用。 问题在于 Timer0中断标志与 ADC 在同一组中。 在代码中使用 ADC 中断  

Fullscreen
1
HAL_ackADCInt(halHandle, ADC_INT_NUMBER1);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

我认为这将清除组1中的所有标记。 Timer0在组1中。  

那么、为了同时使用 ADC 和 timer0中断、我应该怎么做?

或者我应该在没有中断的情况下使用计时器吗? 只检查它们的溢出标志?

谢谢!

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

    尊敬的 Pavlin:

    您能否按住 Ctrl 键 并单击 HAL_ackADCInt ()函数并显示该函数正在执行什么操作? 如果只是确认 PIE 组、那不应该是问题。 这只需在 ISR 完成后使该组中的未来中断(无论是 Timer0中断还是 ADC 中断)生效即可。

    此致、

    Delaney