2023-04-19 10:05 AM
My system has my main thread, a System Timer Thread, and one called Idle that I suspect isn't really a thread. Part of my code reads commands from a UART and then acts on the command. While the code is waiting for the user to enter the next character, the code sits in a tight loop waiting for the character.
I would prefer for the system to go to sleep (maybe STOP2) and wake up if a UART interrupt is received. It looks like ThreadX has some support for going to sleep, waiting for the interrupt, updating the system clock for the number of ticks that the system was asleep, and then continuing to process.
I haven't been able to find an example of this, yet. Is there a generic example or better yet, an STMU585 specific example?
It seems like my code should call tx_thread_relinquish() and let ThreadX handle the timer stuff. Any pointers welcome.
2023-05-04 02:54 AM
Hello @SGrun.1 and welcome to the community,
You can refer to the low power examples under the STM32U5CubeFirmware:
For example: STM32CubeU5-main\Projects\NUCLEO-U575ZI-Q\Examples\PWR
Mohamed Aymen