Tuning Fork
STM32 UART Baud Rate Divisor Exercise
Task
A serial port must send at the speed the other end listens at. That speed is the baud rate. A computer terminal uses one, a MIDI keyboard another, so firmware often reads the rate from its settings when it starts and sets the port to match.
Each test stores a different baud rate in memory before your program starts. Set USART1 to that rate, then print this line once: READY USART1's registers are on the Datasheet tab.
Circuit
Pass condition
READY arrives, and USART1's baud rate register BRR stores the right divisor for this test's rate. BRR is what is checked. READY prints even with a wrong divisor here, though a real board would print garbage.
Notes
USART1 runs on a 16 MHz clock. To set its speed, you divide that clock by a number called the divisor.