eclipse-threadx / threadx

Eclipse ThreadX is an advanced real-time operating system (RTOS) designed specifically for deeply embedded applications.
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx/index.md
MIT License
2.8k stars 767 forks source link

__tx_ts_wait will loop forever (threadx-6.2.1_rel\ports\cortex_m33\gnu\src\tx_thread_schedule.S) #357

Closed amorniroli closed 4 months ago

amorniroli commented 4 months ago

Describe the bug In case of TX_PORT_USE_BASEPRI is not defined and no task are running, function __tx_ts_wait will run forever because of consecutive calls to CPSIE I and CPSID D (see image). In my case, I have systick interrupt (higher priority than pend sv) that is pending but is never executed.

image

Please also mention any information which could help others to understand the problem you're facing:

To Reproduce As described in bug.

Expected behavior After CPSIE I higher priority interrupts are pending should be executed. In my case, it's enough to call ISB after CPSIE I

Impact If task are waiting for timeouts from systick, they will block forever.

Logs and console output

Additional context

amorniroli commented 4 months ago

Nevermind, my bad.