cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure interrupt priorities in a ThreadX project

Hareesh_S
Associate III

Hello,

From my understanding in FreeRTOS, there is a defined highest priority one should set for interrupts whose ISRs may call RTOS APIs (configMAX_SYSCALL_INTERRUPT_PRIORITY).
For the same reasons, I would expect ThreadX to have a similar limitation, and to that extent I have found other ST forums posts suggesting one should set lower priorities for any interrupts whose ISRs may call RTOS APIs, but I can't find any documentation that explicitly states what the highest safe/allowable priority is, similar to FreeRTOS.

How do I know what's the highest interrupt priority I can safely set in such cases? Is there any documentation from ThreadX that I'm missing, because I can't seem to find any mention of this.

For context, I am using a U5 series MCU and I want to call queue related APIs in my CAN Rx callback.

2 REPLIES 2
AScha.3
Super User

Hi,

That's not so difficult:

If you want the rtos working, leave it it's high priorities.

Your tasks then at lower priorities as you like.

If you feel a post has answered your question, please click "Accept as Solution".
Pavel A.
Super User

in ThreadX you can customize macros TX_DISABLE and TX_RESTORE to behave like in FreeRTOS (use BASEPRI), but it seems that CubeMX GUI does not have this option.