AnsweredAssumed Answered

UART FIFO error using DMA with FIFO disabled?

Question asked by Barta.Hank on May 4, 2015
Latest reply on May 13, 2015 by Barta.Hank
Hi folks,
I'm trying to figure out how to resolve this w/out having to abandon DMA. Any suggestions are most appreciated.

The problem seems to be provoked by a slightly larger write to the UART (which is using DMA.) My slightly larger I mean about 250 bytes vs. about 60 bytes. The spot I trap this in the code is at line 7 below (in procedure void HAL_DMA_IRQHandler(DMA_HandleTypeDef *hdma) in stm32f4xx_hal_dma.c.)

01./* FIFO Error Interrupt management ******************************************/
04.  if(__HAL_DMA_GET_IT_SOURCE(hdma, DMA_IT_FE) != RESET)
05.  {
06.    /* Disable the FIFO Error interrupt */
07.    __HAL_DMA_DISABLE_IT(hdma, DMA_IT_FE);
09.    /* Clear the FIFO error flag */

UART TX is configured (using STM32CubeMX) to use DMA2_Stream6 and DMA_CHANNEL_5. (I have manually changed MemInc to DMA_MINC_ENABLE until the next time I use MX to generate code.) When I break on the line listed above, the DMDIS field in S6FCR for DMA2 is 0 so (if I'm looking at the correct bit) this has not been accidentally enabled somewhere between initialization and getting to this point.

One thing that has me wondering is that I have RTS/CTS handshaking enabled. If the device I'm sending to drops CTS could it cause the problem? I would have expected this to be handled more gracefully but the problem may result from some misconfiguration in my code.