Skip to main content
Visitor II
January 30, 2020
Question

how to force STM8S003 MCU to set UART1_RXNE_flag when receiving byte

  • January 30, 2020
  • 1 reply
  • 633 views

standard IAR program. Transmit works normally ( without interrupts ).

Receiving doesn't work not with flag polling, not with interrupt. I have seen in Internet similar questions, but no one answer with reasonable explanation or unconditionally working example.

Thanks in advance.

    This topic has been closed for replies.

    1 reply

    Visitor II
    February 14, 2020

    Hi Ygrod!

    Try to list your code, the USART works perfectly if configured correctly and it's one of the best USART peripherals out there on a 8-bit MCU. The USART_RXNE flag is set by hardware when a byte is received and ready to be read. So you can only "force" it by activating the receiver and supplying a correct byte frame on the RX pin.

    Good luck!