RTC doesn't work with HSE but works with LSE and LSI
Hi all,
I'm currently using a nucleo-L031 board for some testing and I came across a weird RTC phenomenon.
My goal is to do some ADC and send the data through USART, set up an RTC alarm for 10 seconds later, and then fall into stop mode.
I have set up the main system clock to be drawn from the HSE, and the timer setup to use the ADC works correctly (i.e. correctly samples 10 samples over 1 sec, then send the data through USART), so I know that the HSE is clocking.
I was able to achieve the RTC alarm and timing using the LSI and the LSE by adjusting the prescaler values correctly, but I was unable to do this using the HSE no matter the prescaler value. In fact, I even set the prescaler factor to both 1 and to 2^22, but neither had an effect on incrementing time which I tried to get using HAL_RTC_GetTime function.
I'm going to use an STM32F051K8 custom board with this program later, and the MCU is only compatible with an HSE but not an LSE, and considering timining is important in this project, I really need this solved.
Has anyone had this issue or solved it? Any help is much appreciated, thank you in advance!
