Skip to main content
Visitor II
December 21, 2020
Solved

STM32H7 issue with USB DMA

  • December 21, 2020
  • 5 replies
  • 1921 views

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.
    Best answer by Ons KOOLI

    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

    Visitor II
    December 21, 2020

    Hi Gabriel,

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

    Best Regards,

    Ons.

    Gabriel TAuthor
    Visitor II
    December 21, 2020

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

    Visitor II
    December 24, 2020

    Hi Gabriel,

    Can you please disable the cache when using USB DMA.

    Please use a non cacheable memory region.

    Best Regards,

    Ons.

    Gabriel TAuthor
    Visitor II
    January 4, 2021

    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 KOOLIAnswer
    Visitor II
    January 6, 2021

    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.