The serial programming steps

Serial programming step (non-breaking) as follows:

  Enable GPIO clock

  Enable serial clock

  TXD is configured + pull alternate function (standing STM32 chip angle)

  Configured to multiplex RXD + pull function (standing STM32 chip angle)

  Setting data frame

    OVER8 bit configuration (selection oversampling)

               Packet settings, including start bits, stop bits, data bits

  Parity disabled

  Set the baud rate

  Enable transmitter

  Receiver Enable

  Enables the serial port

Guess you like

Origin www.cnblogs.com/anSn/p/11616762.html