Home | Projects | Notes > MCU Peripheral Drivers > USART Application 2: Tx Rx (Interrupt) (usart_02_tx_rx_interrupt.c)

USART Application 2: Tx Rx (Interrupt) (usart_02_tx_rx_interrupt.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_02_tx_rx_interrupt.c

Path: Project/Src/

 

Arduino Sketch (002UARTTxString.ino)

 

 

Testing

The following snapshots are taken using the Logic Analyzer.

 

Entire Communication

usart-application-2-testing-entire-communication

 

Communication in Detail

usart-application-2-testing-communication-part-1

usart-application-2-testing-communication-part-2

usart-application-2-testing-communication-part-3

 

STM32CubeIDE Data Console

usart-application-2-testing-stm32cubeide