SPI4 Rx DMA doesn't work on STM32F4
My tool chain is STM32F429 with STM32CubeMX, and MDK.
I'm using SPI4 to read data from a ADC, though I configure SPI4 as 'duplex master', I only need to read from it. When not using DMA, I call 'HAL_SPI_Receive()' to read data. And there are clock output on SPI_SCK pin. But when I configure it to use DMA (DMA2 Stream 0, P2M, PSIZE = 16bit, MSIZE = 16bit), and after calling '
HAL_SPI_Receive_DMA'
nothing output on SPI_SCK pin. As known, DMA only start after data received, so I don't think the problem is in my DMA configuration. The key point is why there is no clock output on SPI_SCK pin.
It seems
'HAL_SPI_Receive()' will send some dummy bytes to slave and at the same time read back some data. Won't 'HAL_SPI_Receive_DMA()' send dummy bytes?
#willitblend #stm32f4 #spi #dma