2023-07-20 11:50 AM
I am using a UART interrupt to receive a character at a time to fill up a buffer. I am attempting to put the device in low power mode using the UTIL_SEQ_Idle function inside of UTIL_SEQ_Run(UTIL_SEQ_DEFAULT). When the idle function is commented out, the UART interrupt successfully fills in the buffer, however when the idle function is uncommented it never properly fills the buffer. Is there a specific way to implement the UART interrupt to function with the sequencer?
2023-07-26 01:39 PM
I have tried using the HAL Functions provided for STOP mode and am still not able to get the UART to wake up from sleep. I have experimented with using LPUART as well. Below is how I have attempted to implement the low power/wake up functionality.
main.c
HAL_SuspendTick();
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);
LPUART Interrupt Handler
2023-07-26 03:53 PM
All of the related ST's code is broken and they are not even capable of understanding it:
And the same is true for Stop modes:
https://community.st.com/t5/motor-control-mcu/mc-sdk-not-work-with-mcu-stop-mode/m-p/94522
2023-07-31 10:08 PM
Are there any workarounds available for achieving low power mode? Using the HAL functions brings me to 5mA. The documentation I found mention that the current draw should be in uA.
2023-08-01 02:21 PM
I gave you two links, which show and explain many low-power mode related issues and solutions. Have you fixed all of those? The bugs will not go away just because you pretend they are not there...
2023-08-16 08:05 AM
Hi @syed.naqvi ,
For reference, you could find a code example, available on STM32L0 platform, that illustrates a board entering Low power mode, and then being wake up by an incoming char.
Code example is available on github here.
Example could be compiled in 2 different ways : 1 for the board that enters Stop Mode, and 1 for the board that sends characters for board wake up. Please have a look at possible configurations in UART/LPUART according to the type of event that will wake up the board (RXNE flag, Start bit, 4b or 7b address).
Hope this could help you.
Regards