cancel
Showing results for 
Search instead for 
Did you mean: 

DMA using USART3 on STM32H7 part

dawime
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

View solution in original post

5 REPLIES 5
Georgy Moshkin
Senior II

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.

Disappointed with crowdfunding projects? Make a lasting, meaningful impact as a Tech Sponsor instead: Visit TechSponsor.io to Start Your Journey!
Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
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

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen