SPI DMA - Communication between STM32H753ZI and ESP32S
Hi,
I'm trying to set up SPI communication between a STM32H753ZI (Master, using SPI2) and an ESP32-S (Slave), using the ESP32SPISlave library.
Setup:
STM32 SPI2 pins:
PB10 (SCK) → ESP32 GPIO18
PC2 (MISO) ← ESP32 GPIO19
PC3 (MOSI) → ESP32 GPIO23
PE11 (CS) → ESP32 GPIO5
SPI Mode 0, 8-bit, NSS controlled manually (software)
GND is shared, 3.3V logic
- Prescaler (for Baud Rate) 256
- SYSCLK 400MHz
The STM32 sends 0x55 and expects a reply (ESP32 sends 0xAB via transfer()), but I always receive 0x00.
CS is pulled LOW just before HAL_SPI_TransmitReceive() and HIGH after. The transfer function does not block.
Question:
Why is STM32 always reading 0x00 on MISO, even though the ESP32 slave is responding with data? Any ideas or STM32-specific SPI2 issues I should check?
I don't know how I have to configure the ESP's clock, same with the STM32..
Thanks in advance!
