Title: Setting Up UART with STM32F411RE Microcontroller

The article provides a step-by-step guide on setting up the USART2 interface for communication with a computer via USB on an STM32F411RE microcontroller. The setup process involves enabling the USART, configuring the baudrate, and writing data to the pin.

To start, the article explains that using USART2 allows for direct communication with the computer without the need for a chip to convert from UART to USB. This is made possible by the Alternate function mapping in the datasheet, which shows that creating a UART TX involves pins PA2 and AF07.

The next step is to enable USART in bit 13 and set the baudrate at 115200. The article provides a formula for calculating the baudrate based on the frequency of 16Mhz. Finally, the writer explains how to write data to the pin, checking if the send status is okay before sending.

Source: https://dev.to/vietdt89/setup-uart-with-stm32f411re-l4

Reply to this note

Please Login to reply.

Discussion

No replies yet.