2022-10-24 03:36 PM
In my application, I need to put the MCU in a low-power mode and wake it up periodically (as
https://community.st.com/s/article/how-to-configure-the-rtc-to-wake-up-the-stm32-periodically-from-low-power-modes). The MCU is connected to a sensor. While the sensor is collecting data, the MCU is in a low-power mode. The modes I tested my code with are SLEEP, LPSLEEP, and STOP2. The wakeup source is RTC.
LSI1 is said to be less power-hungry compared to LSE, which is why I would prefer to use it. When I select LSI1 as a source for RTC, I cannot reset the MCU using an external button connected to the NRST pin (only turning the power on and off restarts it). When LSE is used, the MCU operates as expected. In RM0434, it is said that LSI is available in all the above modes.
I was not able to find the root of the problem. I would appreciate it if you could provide me with any suggestions on how to better explore this issue (which registers' content to check, I assume; probably, RCC_CSR and RCC_BDCR).
My other assumption was about interrupts and their priorities, but they should not be affected by choosing a different clock source.
I use STM32CubeIDE v1.8.0 Build: 1526_20211125_0815 (UTC) and STM32Cube FW_WB V1.13.0 firmware package.
Please, let me know if I can provide any additional information.