I want to use uart function on STM32l151. It is ok when MCU run in normal mode. When I set configUSE_TICKLESS_IDLE is 1. The uart can’t send the correct data to pc terminal. I use oscilloscope to check uart data timing. If it is normal, the timing is ok. If it is wrong, the time is 1.5 times as long as the normal time. How do I check low power mode process?
You would have to check the device data sheet to see the effect on the UART of entering low power mode (for example, its clock may stop), and how long it takes to exit low power mode. However it might be easier just to not enter low power mode while the UART is in use. You can use the pre and post sleep macros to abort entering low power mode.
I only use USART_SendData. It is one byte function from STM32l151 driver. The timing is wrong in low power mode. Uart has the interrupt to MCU.
If the configUSE_TICKLESS_IDLE is 0, the uart function is ok. So I thing software maybe be the answer. I want to find where could effect the uart.