stm32 hal spi dma transfer only sends first byte
STM32F407VG, CubeIDE 1.14, HAL drivers. Trying to send a 16-byte buffer to a display over SPI1 with HAL_SPI_Transmit_DMA. The first byte goes out, then the DMA transfer complete callback fires but the rest is garbage / never arrives. Polling mode (HAL_SPI_Transmit) works fine with the same buffer and settings. I'm using a global uint8_t buffer. My theory is the buffer goes out of scope - but it's global, so no. What am I missing with DMA? Do I need to wait for the callback before modifying the buffer?
4 replies