Hi,
We are using the demo exmple code (lwip_dhcp_usb_freertos) from the IAR SDK provided by NXP for imxrt1176 mpu and we are using the flexspi_nor_debug linker script. the project runs successfully when we use default linker script, but when we change the data sections from DTC RAM to either OC1_RAM or external SDRAM memory location, the code doesn't work.
Sometimes it gives the hardfault in the lwip functionality or sometimes it stucks in IDLE task only, not giving the execution time to other tasks and hence not communicating with USB host device.
Can anyone please tell us why lwip functionality is causing different behaviour when running in DTC RAM or SDRAM locations? OR how can we resolve this issue?
Hi @pratiknaphade2 ,
This kind of problem is caused by cache. DTCM doesn't use cache while OCRAM and SDRAM access using cache by default. You can refer to these post.
https://community.nxp.com/t5/MCUXpresso-IDE/Running-and-debugging-program-in-SDRAM/m-p/1405167
https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Using-NonCached-Memory-on-i-MXRT/ta-p/1183369
https://community.nxp.com/t5/i-MX-RT/USB-Host-enumeration-fails/m-p/1436138
Regards,
Jing