2017-12-27 10:42 PM
Hello,
I'm facing an issue i cannot figure out. I'm currently working on a stm32l073 and using the following RTOS : RIOT-OS. When i wake up from stop mode, UART seems to be desynchronized because wrong characters are displayed.
I have noticed that when i'm decreasing system clock, AHB clock and ABP clock all is working fine. Am i doing something wrong or do i need to reconfigure clock in the interrupt that is waking up the CPU from stop mode (this a RTC interrupt) ?
If you have any ideas about this issue, feel free to share your thoughts
Best regards,
Aur�lien
#stm32 #stop-mode #stm32l0732018-01-04 05:02 AM
I think this is a question for the
https://community.st.com/community/stm32-community/stm32-forum
2018-05-02 10:27 AM
Hi
Aurélien,
I am also experiencing the same thing...
Did you ever have any luck with a solution??
2018-05-02 02:35 PM
Hi,
Now, just after the wake up, i reconfigure the clock. Actually, this is done by the RTOS. I'm using RIOT-OS which is quite new but well done.
Regards,
Aurélien
2018-05-02 02:43 PM
Hi,
I have not been as lucky as you I'm afraid.
I'm using MXCUBE and FREERTOS. The steps I am following are:
Before STOP Mode I do some hardware configuration, deinit the UART and start the RTC wake up on interrupt.
When that is done I reinit the UART. I am expecting to see a message OK come back from the UART but nothing happens.
2018-05-02 03:15 PM
i'm not sure you need to deinit and then reinit the UART driver, but just after wake up (after wfe or wfi instruction), try to reinit the entire clock tree by calling systemClockInit or something like that
2018-05-03 02:35 AM
I have seen the deinit and init on numerous posts...
Should the code stop running completely when it hits the STOP function and only continue after?
My code is below. The SystemClockConfig_STOP function reconfigures the clock tree. I am using an RTC wakeup interrupt.
HAL_SuspendTick();
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI); HAL_ResumeTick(); SystemClockConfig_STOP();2018-05-04 04:51 AM
Hi,
Where are you trying to print. Is it in your RTC interrupt ?
2018-05-04 05:45 AM
Try to call
SystemInit();
directly after wake up.
2018-05-04 07:11 AM
I'm suspecting you are trying to print before the clock a reinitialized. Indeed, your interrupt triggers before you main code continues running after the stop instruction !