cancel
Showing results for 
Search instead for 
Did you mean: 

USART interrupt priority and TIM brake interrupt priority

duan
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
cedric H
ST Employee

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

View solution in original post

4 REPLIES 4
cedric H
ST Employee

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

Andrew Neil
Super User

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.

Hello @Cedric,

Thank you very much for your answer.

Regards

duan

Hello ,@Andrew Neil,

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

Regards

duan