cancel
Showing results for 
Search instead for 
Did you mean: 

Hello, I am working on UART Transmit using DMA for STM32F401RE board.I have written code for register level operations.I am using DMA1 with MSIZE of byte and MBURST of 16 beats, total data of 48 bytes. Getting FIFO transmit Error. What is the issue?

DJ1
Associate III

For testing purpose i am transmitting an array of 8 bytes with . But still the FIFO transmit ERROR flag in HISR is always getting set. Please do help!

1 ACCEPTED SOLUTION

Accepted Solutions

From reading the code it appears to be OK, but maybe I'm overlooking something.

However, the mcu does not work out of source code but out of the registers. Read out and check/post content of DMA registers after the error occurs.

JW

PS. sylistics:

  • don't reinvent the wheel: where available, use symbols from CMSIS-mandated header. Makes things easier to read by others, and helps avoiding errors like

   // PSIZE 1 byte

   DMA1->DMA_S6CR &= ~(3 << 12);

  • don't assemble bitfields into a single register by successive RMW - write an expression assembling those values and assign (or RMW, but that's rarely needed in initialization, usually only in runtime and that's relatively rare either) into given register

View solution in original post

1 REPLY 1

From reading the code it appears to be OK, but maybe I'm overlooking something.

However, the mcu does not work out of source code but out of the registers. Read out and check/post content of DMA registers after the error occurs.

JW

PS. sylistics:

  • don't reinvent the wheel: where available, use symbols from CMSIS-mandated header. Makes things easier to read by others, and helps avoiding errors like

   // PSIZE 1 byte

   DMA1->DMA_S6CR &= ~(3 << 12);

  • don't assemble bitfields into a single register by successive RMW - write an expression assembling those values and assign (or RMW, but that's rarely needed in initialization, usually only in runtime and that's relatively rare either) into given register