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().
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
Hi Hugo,
It was fixed in my case by setting the following macros:
DATA_SECTION_IS_CACHEABLE =1
XIP_EXTERNAL_FLASH = 0
Cheers
Jason
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