STM32G4 HAL UART Printf

This example demonstrates how to retarget the C library printf function to the UART using the STM32G4 HAL compatibility layer on the AM13E2X device. It shows UART transmission capabilities through printf function.

This example is designed to help users migrating from STM32G4 platforms to AM13E2X by demonstrating that existing STM32G4 HAL UART code can run with minimal modifications.

External Connections

No external connections are required for this example. The board includes an on-board USB-to-UART converter for debugging and communication purposes.

Pin Connections

The UART pins are connected to the on-board USB-to-UART converter:

AM13E2X Pin

Function

Connection

PA0

UART_TX

To on-board USB-to-UART converter TX

PA1

UART_RX

To on-board USB-to-UART converter RX

GND

GND

Ground

Note: This example uses UART5 peripheral with pins PA0 (TX) and PA1 (RX).