2023-08-30 04:46 AM
I'm using a custom board with a STM32L431RCT6 MCU and I need to activate the Ultra Low Power modes on it. I'm trying to use HAL_Delay before HAL_PWR_EnterSTANDBYMODE() and that's where the code breaks. Does anyone have any sugestion on how to fix the problem?
I'm a beginner using CubeIDE and using microcontrollers in general.
Solved! Go to Solution.
2023-08-30 06:17 AM
Hi @Bajoras
Thank you for posting.
Try to configure WakeUP4 Pin (you can configure it with STM32CubeMX : System Core>SYS>Mode) before you run HAL_PWR_EnterSTANDBYMode();
Thank you.
Souhaib
2023-08-30 06:07 AM
Sounds like you might be disabling SysTick before entering standby, in which case HAL_Delay won't work. You should still disable SysTick, but you can't use HAL_Delay after that point.
2023-08-30 06:17 AM
Hi @Bajoras
Thank you for posting.
Try to configure WakeUP4 Pin (you can configure it with STM32CubeMX : System Core>SYS>Mode) before you run HAL_PWR_EnterSTANDBYMode();
Thank you.
Souhaib
2023-09-04 07:28 AM
Hello, thank you for the fast response! It works, I just needed to activate WakeUP4 Pin, but why does it work doing just that? I didn't include anything related to the WakeUP4 Pin in my code, just checking it in the .ioc file did the trick. Can someone explain it to me, please?
2023-09-06 05:21 PM
Because all of the HAL/Cube code is a broken bloatware.
2023-09-11 02:57 AM
I found out later that I didn't really need the WakeUP4Pin and the code was actually breaking within the HAL_PWR_EnterSTANDBYMODE(), I needed to reallocate the vector table by uncommenting the line 126 at "system_stm32l4xx.c". Thanks for the responses