Hi,
My application is XIP from external QSPI flash and so I want to setup the flexRAM to be all DTCM (so zero ITCM). But when I do this, my application starts misbehaving - specifically, the ethernet comms stops working.
So far as I am aware, my application is not using any ITCM. This is confirmed when I build the code that works, the linker is showing zero usage for ITCM.
Here are my settings for the flexRAM:
// IOMUXC_GPR_GPR14
// configures DTCM total size (bits 23..20) and ITCM total size (bits 19..16)
*((volatile unsigned int *)0x400AC038) = 0x00a00000; // DTCM=512KB ITCM=0KB
// IOMUXC_GPR_GPR17
// configures each flexRAM bank as either OCRAM, DTCM, ITCM or not used
*((volatile unsigned int *)0x400AC044) = 0xaaaaaaaa; // DTCM=512KB ITCM=0KB OCRAM=0KB
// IOMUXC_GPR_GPR16
*((volatile unsigned int *)0x400AC040) = 0x00200006; // use FLEXRAM_BANK_CFG to config, enable DTCM, disable ITCM
And in board.c I comment out this line:
MPU->RBAR = ARM_MPU_RBAR(5, 0x00000000U);
//MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 0, 0, 1, 1, 0, ARM_MPU_REGION_SIZE_32KB); //ITCM
My initial thought was this might be to do with ethernet buffers/descriptors, but my project has non cacheable memory setup as DTCM and so this should be OK.
What might I be doing wrong? How do I setup the flexRAM to have ITCM=0?
thanks!