Home | Projects | Notes > MCU Peripheral Drivers > USART Application 1: Tx (Blocking) (usart_01_tx_blocking.c)

USART Application 1: Tx (Blocking) (usart_01_tx_blocking.c)

 

Requirements

Parts Needed

  1. Arduino board

  2. STM32 board

  3. Logic level converter

  4. Breadboard and jumper wires

STM32 Board and Arduino Board Communication Interfaces

 

i2c-application-communication-interfaces

 

STM32 Board and Arduino Board Voltage Levels

 

spi-application-2-stm32-arduino-voltage-levels

 

Using printf() to Print Messages in STM32CubeIDE Console

 

Setup

1. Find out the GPIO pins that can be used for USART communication

2. Connect STM32 Discovery board with Arduino Uno board I2C pins

 

usart-application-1-hardware-setup

 

3. Power Arduino board and upload SPI slave sketch to Arduino

 

Code

usart_01_tx_blocking.c

Path: Project/Src/

 

Arduino Sketch (001UARTRxString.ino)

 

 

Testing

The following snapshots are taken using the Logic Analyzer.

 

Entire Communication

usart-application-1-testing-entire-communication

 

Bit Time

usart-application-1-testing-bit-time

 

START / STOP Bits

usart-application-1-testing-start-stop-bits

 

 

Arduino IDE Serial Monitor

usart-application-1-testing-arduino-ide