AnsweredAssumed Answered

STM32F4 SPI DMA Unexpected Overrun Error

Question asked by Pablo Leibovich on Oct 17, 2017
Latest reply on Oct 21, 2017 by Pablo Leibovich

Hi everyone!

I'm working with an external IC which must be read with a "burst transfer".

I have to receive 122 half words (16 bit spi transfers), so I use an SPI DMA reception.

When I configure a buffer in my code as 

uint16_t burst[122]


and make the DMA transfer


HAL_SPI_Receive_DMA(&hspi2, (uint8_t*) burst, 122)


The code fails. It makes the first reception ok but the next transfers fail by setting the overrun bit.


The matter is that if I set the burst buffer to have 123 elements and make a DMA reception of 122 half words, everything works ok.

What can be happened?


Thank you all!