2017-02-20 11:22 PM
hi,
i write code to wake up with uart interrupt for stm32f4 discovery board.
before sleep i use deinit uart function and configure rx pin as a gpio exti, in exti handler function i use deinit pin and init uart functions. Code works with 2 loss bytes on stm32f4 board. other bytes can succesfully receive.
i tried the same code on nucleo stm32f103rb board. it failed. then i tried different way. first i sent dummy package to wake up mcu and next i sent real package, but it is not stable. sometimes succesfull sometimes incomplete or wrong.
so i wanna ask what is the better algorithm for me, or what i have to change in my code to work on stm32f103rb board?
thanks in advance.
#uart.stm32-uart #stop-mode #stm32-power-management #wfi2017-02-21 03:56 AM
Hello
I have moved your thread to the
‌ where someone should be able to help you.Thanks
Oli
2017-02-21 04:54 AM
On some STM32, for low bit rate, there are LPUART which are designed to wakeup byitself and catch the first received byte. Otherwise, before entering stop mode, stop the UART clock so no need to reload all registers: Reboot must be as prompt as possible. Maybe boot without PLL, use 16MHz (tolerances and bitrate may or may not be compatible here). In some STM32 peripheral may use other clock sources than SYSCLK. The goal is to start as soon as possible. If sending dummy byte is possible, use a fixed header byte to discard incoming dummies.
2018-12-11 02:52 AM
could you share your code