Skip to main content
suba
Associate II
February 13, 2020
Question

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 .

  • February 13, 2020
  • 1 reply
  • 539 views

..

This topic has been closed for replies.

1 reply

waclawek.jan
Super User
February 13, 2020

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