USB example crashed when it ran from SDRAM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB example crashed when it ran from SDRAM

962 Views
jasonedn
Contributor II

It worked when the usb example "dev_audio_generator_bm" ran from qspi flash on rt1020evk. However it crashed when it ram from SDRAM.  It always crashed at USB_DeviceEhciSetDefaultState(). Actually it crashed only after ehciState->registerBase->DEVICEADDR = 0U in USB_DeviceEhciSetDefaultState(). 

0 Kudos
3 Replies

768 Views
h_bouchard
Contributor III

Hi @jasonedn,

Did you solve your problem? If so, how?

I'm also experiencing the same issue and the fix proposed by Daniel doesn't work. I put my entire code and data in ITCM and DTCM but it still crashes at line ehciState->registerBase->DEVICEADDR = 0U in USB_DeviceEhciSetDefaultState(). 

Funny thing is that it works without a debugger connected...

Thanks
Hugo

0 Kudos

742 Views
jasonedn
Contributor II

Hi Hugo,

It was fixed in my case by setting the following macros:

  DATA_SECTION_IS_CACHEABLE =1

  XIP_EXTERNAL_FLASH = 0

Cheers

Jason

Tags (1)
0 Kudos

951 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi @jasonedn 

 

Please refer to below article for your issue

https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Using-NonCached-Memory-on-i-MXRT/ta-p/1183369

 

Regards

Daniel

0 Kudos