2025-06-08 7:46 PM - last edited on 2025-06-09 2:26 AM by Andrew Neil
Hi,
In the motor program generated by MCSDK, I have doubts about the configuration of interrupt priority for USART and TIM. In the program, the interrupt priority for USART is (3.1), while Tim's brake interrupt is (4.1).
In practical driving, the brake interruption of TIM involves overcurrent protection of the motor, which directly affects the safety of the motor and controller. However, its priority is lower than that of USART. In this configuration, will it increase the safety risk of the motor and controller when USART is frequently disconnected or in other unexpected situations? Can you help me unravel this doubt?
thank you.
Duan
Additional program screenshot:
Solved! Go to Solution.
2025-06-09 2:10 AM
Hello @duan,
The protection is guaranteed by hardware. The Break input of the timer automatically switch off the PWM generation.
The SW Interrupt is there only to report the error to the application and is not involved in the safety. The interrupt level is then perfectly fine.
Regards
Cedric
2025-06-09 2:10 AM
Hello @duan,
The protection is guaranteed by hardware. The Break input of the timer automatically switch off the PWM generation.
The SW Interrupt is there only to report the error to the application and is not involved in the safety. The interrupt level is then perfectly fine.
Regards
Cedric
2025-06-09 2:25 AM
Welcome to the forum.
@duan wrote:Additional program screenshot:
Please see How to insert source code - not as screenshots.
2025-06-09 2:30 AM
2025-06-09 2:33 AM
Hello ,@Andrew Neil,
Thank you for your suggestions and teaching links, I will pay attention to them in the future, thank you.
Regards
duan