cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746 USB Host examples do not work with vars in SRAM1 ?

sv1eia
Associate II
Posted on August 31, 2016 at 14:16

Hi,

Using the CubeF7 USB Host examples ok with default provided linker script (using SW4STM32 SystemWorks IDE).

Yet, when moving the .bss & COMMON section out of the DTCM RAM region into the SRAM1 RAM region, example programs stop working properly their USB functions.

E.g. no enumeration happens etc.

(DTCM = 0x20000000 .. 0x20010000)

(SRAM1 = 0x20010000 .. 0x2004C000)

Is there a caveat or something to know regarding the used variables of USB Host middleware in accordance to memory mapping? Are there any DMA restrictions for that somewhere in USB?

(Similar there are some variables placed specifically in DTCM for the ethernet module in other examples but not in USB Host examples)

If there are some critical variables (like those in ethernet) I could put them specifically in DTCM via linker scripting, yet I need to know which are those.

Any hints are welcome.

Christos

#stm32f7-usb-dma
1 REPLY 1
Gunnar Bohlen
Associate III
Posted on June 26, 2017 at 09:01

Hi,

I can't tell you which variables you have to place into DTCM memory,  but you should place all variables into DTCM-Memory that get modified by the USH host controller. (e.g. databuffers that are used by DMA transfers)

CPU accesses SRAM1 via DCache, so if another hosts modifies the SRAM1, the CPU won't see the change as long as the DCache isn't updated.

For a test disable Dcache and see if it is then working. Look at AN4839.