receive data uart with DMA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-11 7:13 AM
I am trying to receive data over usart using dma with LL. I'm stuck with this for one week. I need help please.
- Labels:
-
DMA
-
STM32F4 Series
-
UART-USART
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-11 7:37 AM
Which STM32?
What are the symptoms? Can you receive from the same pin using polling? Are clocks of DMA, USART, GPIO enabled in RCC?
Read out and check/post content of USART, DMA and relevant GPIO registers' content.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-11 8:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-11 8:08 AM
Hi! Thank you for replying. I tried to send some text using the LL_USART_TransmitData8 and it works fine. Same for receiving with LL_USART_ReceiveData8.
As for the clocks, they're enabled in the clock file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-11 9:31 AM
Which STM32?
Read out and check/post content of USART, DMA and relevant GPIO registers' content.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-12 1:30 AM - edited ‎2023-11-20 8:31 AM
stm32 f407
I don't know if the image is clear, but all the registers are empty
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-12 6:00 AM
I put the USART2_DMA_RX inside the while loop in the main file and now the red led (transfer complete interrupt) turns on but only when I reset or flash the microcontroller. I tried to do the same for transmission with DMA and it is working fine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-12 6:27 AM
Being all zero suggests the clocks aren't enabled when looking at them.
​
F​or RX make sure all noise, framing, parity errors etc are cleared first.
​
C​heck that polled RX works, has to be properly receiving.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-13 3:11 AM
Yes it works with polling and transmission with DMA also works. All the clocks are enabled, I checked. I even took the configuration of pins from a working code using registers and as always, TX works fine, RX does not
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-04-13 4:13 AM
If all the UART registers are zero, Tx can't work. It means, you've read out the registers content while UART and DMA were not set up yet - just after reset, perhaps? That's not useful.
Read out the registers after they've been set up, and then again after some characters have been sent to Rx; check, compare, post.
JW
