Parrot

STM32 UART Echo Exercise

Task

The bench sends bytes on USART1 RX while your program runs. Your code only reads them. Bring USART1 up from reset, then send back every byte that arrives, for as long as the board runs. The registers and bit fields are on the Datasheet tab.

Circuit

Block diagram: a host serial console wired to U1 STM32F4 on three lines, the console's TX into USART1 RX on PA10, USART1 TX on PA9 back to the console's RX, and a common ground, with a TP1 serial monitor on the TX net

Pass condition

Each byte comes back once, in the order it arrived, whatever its value.

Expected output for the word case: the bytes H, e, l, l, o arrive one after another on RX and the same five bytes leave on TX in the same order

Notes

The console talks 115200 baud, 8N1: BRR = 0x8B. The bench moves bytes where a board would not, so it reads the setup from the registers.

Related challenges

Loading the interactive arena.