STM32G4 HAL SPI Polling Slave
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 as a slave device.
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 (see SPI_Poll_Master example)
Slave board (this example)
Pin Connections (Slave)
Connect the SPI pins between the AM13E2X (slave) and STM32G4 (master) 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.