STM32G4 HAL SPI Polling Master

This example demonstrates the usage of the STM32G4 HAL compatibility layer for SPI communication in polling mode on the AM13E2X device. It shows how to transmit and receive data buffers using SPI APIs with polling-based transfer.

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

External Connections

This example requires two boards connected via SPI:

  • Master board (this example)

  • Slave board (see SPI_Poll_Slave example)

Pin Connections (Master)

Connect the SPI pins between the AM13E2X (master) and STM32G4 (slave) boards:

AM13E2X Pin

Function

STM32G4 Pin

Function

PA20

MISO

PB4

MISO

PB5

SCK

PC5

SCK

PB10

MOSI

PC10

MOSI

Note: The NSS (chip select) pin is not used in this polling mode example.