Skip to main content
ygrod
Associate
Question

how to force STM8S003 MCU to set UART1_RXNE_flag when receiving byte

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

    Cristian Gyorgy
    Associate II

    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!