cancel
Showing results for 
Search instead for 
Did you mean: 

Hi i pursuing master degree. i m just a beginner of stm32. i do only led blinking on my board stm32g431rb. i need help to perform serial communication . i dont have any clear ideas . please help me .

suba
Associate II
 
1 REPLY 1

Read the USART chapter. Initialize it - enable clock in RCC, set up pins (enabling respective GPIO clock in RCC and writing respective GPIO registers), set baudrate in baudrate register, enable UART and Tx and Rx in CR1. Write data into transmit data register - while observing the TXE status bit - and observe Tx pin using oscilloscope or logic analyzer. Loop back Tx pin to Rx pin and observe RXNE status bit and read out the Rx data.

Most or all this you can do in the debugger alone, without needing to write any code.

JW