USB example crashed when it ran from SDRAM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

USB example crashed when it ran from SDRAM

2,566 次查看
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 项奖励
回复
3 回复数

2,372 次查看
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 项奖励
回复

2,346 次查看
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

标记 (1)
0 项奖励
回复

2,555 次查看
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 项奖励
回复