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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-02 10:43 PM
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!
Solved! Go to Solution.
- Labels:
-
DMA
-
STM32F4 Series
-
UART-USART
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-03 2:38 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-03 2:38 AM
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
