Skip to main content
dawime
Associate
September 26, 2021
Solved

DMA using USART3 on STM32H7 part

I am trying to get the USART3 to work with DMA, and so far have been unable to. After the initial cubeIDE project setup, I verified that standard (non DMA) RX and TX were working fine.

Moving to DMA, I was getting Direct Mode Error interrupts, and a little bit of digging showed me that the buffers I was using to send data were located in the DTCM ram. Changing that to move it to the D2 Space (starting at 0x3000000), and verifying the map file, I don't get Direct mode error interrupts, but I get no transmission of any bytes either.

Any thoughts or suggestions as to why DMA would not work on usart3? (FYI, I am using DMA successfuly on the SAI peripheral, so I know that DMA2 is working - USART uses DMA1). Thanks

This topic has been closed for replies.
Imen.DBest answer
ST Technical Moderator
September 30, 2021

Hello @Community member​ ,

Were you able to resolve the issue?

It will be interesting to share with us your update or the solution you found.

Please let me know if the answer proposed by @Georgy Moshkin​ or @Community member​ solved your issue? If yes, please "Select as Best" button.

If not, maybe you have the same issue as described in this post.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks

5 replies

Georgy Moshkin
Senior
September 27, 2021

Make use that you enabled "USART3 global interrupt" in NVIC Settings tab of "USART3 Mode and Configuration" of STM32CubeIDE configuration tool. STM32 HAL have some DMA-related code in USART interrupt handler. If it still does not work, please show how you call HAL functions.

Check my STM32 Bootloader - flash your STM32 with AES-encrypted binaries right from web browser!
Imen.DBest answer
ST Technical Moderator
September 30, 2021

Hello @Community member​ ,

Were you able to resolve the issue?

It will be interesting to share with us your update or the solution you found.

Please let me know if the answer proposed by @Georgy Moshkin​ or @Community member​ solved your issue? If yes, please "Select as Best" button.

If not, maybe you have the same issue as described in this post.

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
dawime
dawimeAuthor
Associate
October 4, 2021
I have not, but I figured it out. CubeMX when generating code incorrectly generates the init for DMA after the serial init when you have more than 1 peripheral in the project.
Changing the order of the code makes it work
ST Technical Moderator
October 4, 2021

Glad to know you overcame this problem :)

So, You have the same issue as I already reported, and this will be resolved in the coming release of CubeMX.

Internal ticket 112040 (This is an internal tracking number and is not accessible or usable by customers)

Thanks for your contribution

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks