AnsweredAssumed Answered

STM32F4 USB DMA fault AHBERR with buffer destination in RAM Area 0x10000000

Question asked by strobl.christian on Oct 2, 2013
Latest reply on Oct 2, 2013 by strobl.christian
I have some DMA problems with USB HS  in Hostmode on STM32F4. 
I use USB Library V2.1.0 and set up USB HS with internal PHY in Host Mode and MSC., 
USB FS in Device Mode and MSC.
If Compiler (Keil UVision) sets all _Core_Handle and _Host in Memory area above  0x20000000, all works fine. If Compiler use Memory Area 0x10000000 , DMA of USB Core crashes with AHBERR and no change to get out from  USB HS interrupt routine.

This is always when DMA points to a OUT buffer in second RAM area 0x10000000.

If i set the core Handles via __attribute__ in the 0x20000000 Area, it works as long as 
a Buffer in 0x1 Area will be used at example USBH_MSC_BOTXferParam.pRxTxBuff = USBH_DataInBuffer, which is not in 0x20000000 Area.

I tried many days to find out this Bug ( USB Sample works cause compiler uses only 0x2 Area for variables, integrated in a bigger project compiler aligned all usb related variables in 0x1 Area and usb crashes), and it seems it is  a  Hardware Problem with integrated DMA in USB Core not described in STM32F4 errata sheet. 

Do anyone have  experiences with this problem or found a solution without align related variables per hand into 0x2000000 RAM area??

Thanks for help