2023-04-11 07: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.
2023-04-11 07: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
2023-04-11 08:07 AM
2023-04-11 08: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
2023-04-11 09:31 AM
Which STM32?
Read out and check/post content of USART, DMA and relevant GPIO registers' content.
JW
2023-04-12 01:30 AM - edited 2023-11-20 08:31 AM
stm32 f407
I don't know if the image is clear, but all the registers are empty
2023-04-12 06: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
2023-04-12 06:27 AM
Being all zero suggests the clocks aren't enabled when looking at them.
For RX make sure all noise, framing, parity errors etc are cleared first.
Check that polled RX works, has to be properly receiving.
2023-04-13 03: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
2023-04-13 04: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