cancel
Showing results for 
Search instead for 
Did you mean: 

Need to ignore the unwanted start bit during the stop mode.

prudhvichitturi
Associate II

I am working on STM32L051R8, which is set to use Stop mode, which wakes up on the start bit.

I have a situation where the MCU wakes up on an unwanted start bit, and UART extracts unwanted data. The expected action is to ignore the unwanted data and enable it to wake up again when it is supposed to.

I have tried to use 

      SET_BIT( huart1.Instance->CR1, USART_CR1_RE );
      CLEAR_BIT( huart->Instance->CR1, USART_CR1_RE );
which kind of worked but when using below
    CLEAR_BIT( huart->Instance->CR1, USART_CR1_RE ); the current consumption increased.
 
 
 
2 REPLIES 2
Pavel A.
Evangelist III

How do you know that the start bit is unwanted and does not indicate valid data?

 

TDK
Guru

When you receive "unwanted data", ignore it and go back to sleep. As far as the UART is concerned, A start bit indicates valid data.

If you feel a post has answered your question, please click "Accept as Solution".