Skip to main content
Associate II
June 9, 2025
Solved

USART interrupt priority and TIM brake interrupt priority

  • June 9, 2025
  • 2 replies
  • 498 views

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:

1280X1280.PNG

Best answer by cedric H

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

2 replies

cedric H
cedric HBest answer
Technical Moderator
June 9, 2025

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

duanAuthor
Associate II
June 9, 2025

Hello @Cedric,

Thank you very much for your answer.

Regards

duan

Andrew Neil
Super User
June 9, 2025

Welcome to the forum.

 


@duan wrote:

Additional program screenshot:


Please see How to insert source code - not as screenshots.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
duanAuthor
Associate II
June 9, 2025

Hello ,@Andrew Neil,

Thank you for your suggestions and teaching links, I will pay attention to them in the future, thank you.

Regards

duan