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.
工具与软件:
您好! 我想将 Timer0 (或 Timer1或 Timer2)与 MotorControl SDK 一起使用。 问题在于 Timer0中断标志与 ADC 在同一组中。 在代码中使用 ADC 中断
HAL_ackADCInt(halHandle, ADC_INT_NUMBER1);
我认为这将清除组1中的所有标记。 Timer0在组1中。
那么、为了同时使用 ADC 和 timer0中断、我应该怎么做?
或者我应该在没有中断的情况下使用计时器吗? 只检查它们的溢出标志?
谢谢!
尊敬的 Pavlin:
您能否按住 Ctrl 键 并单击 HAL_ackADCInt ()函数并显示该函数正在执行什么操作? 如果只是确认 PIE 组、那不应该是问题。 这只需在 ISR 完成后使该组中的未来中断(无论是 Timer0中断还是 ADC 中断)生效即可。
此致、
Delaney