cancel
Showing results for 
Search instead for 
Did you mean: 

how to force STM8S003 MCU to set UART1_RXNE_flag when receiving byte

ygrod
Associate II

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.

1 REPLY 1
Cristian Gyorgy
Senior III

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!