Skip to main content
Gabriel T
Senior
Dec 21, 2020 9:09 AM UTC
Solved

STM32H7 issue with USB DMA

Hi,

I am working with STM32H743ZI

When I enable USB DMA, writing enable here :0693W000006FzgbQAC.png 

I have 3 bytes of offset in my frames, my frame is supposed to start with aa:55:dd:aa instead of 00:00:00:aa:55:dd:aa0693W000006FwU8QAK.pngIt is fixed when I disable DMA but I want to use it

Here is my memory usage :

0693W000006GR8mQAG.pngAny parameter I am missing ?

Regards,

Gabriel

This topic has been closed for replies.
Ons KOOLI
Ons KOOLIBest answer
Visitor II
Jan 6, 2021 3:13 PM UTC

Hi Gabriel,

No, for H7 devices DTCM could not be accessed when enabling DMA USB.

Please refer to this FAQ, it should be helpful. It is wrote for the use of DMA peripheral in STM32H7 devices, but this is applicable when using DMA for USB too.

Best Regards,

Ons.

5 replies

Ons KOOLI
Visitor II
Dec 21, 2020 10:12 AM UTC

Hi Gabriel,

Can you attach your .ioc file as well your linker file?

Best Regards,

Ons.

Gabriel T
Gabriel TAuthor
Senior
Dec 21, 2020 10:24 AM UTC

I attached a zipped file with .ioc , flash.ld and ram.ld

Ons KOOLI
Visitor II
Dec 24, 2020 10:00 AM UTC

Hi Gabriel,

Can you please disable the cache when using USB DMA.

Please use a non cacheable memory region.

Best Regards,

Ons.

Gabriel T
Gabriel TAuthor
Senior
Jan 4, 2021 12:26 PM UTC

Hi,

If I get it right, I should put buffers used by USB in DTCM RAM but will the USB DMA be able to access it ?

Regards,

Gabriel

Ons KOOLI
Ons KOOLIBest answer
Visitor II
Jan 6, 2021 3:13 PM UTC

Hi Gabriel,

No, for H7 devices DTCM could not be accessed when enabling DMA USB.

Please refer to this FAQ, it should be helpful. It is wrote for the use of DMA peripheral in STM32H7 devices, but this is applicable when using DMA for USB too.

Best Regards,

Ons.