flexRAM - problem setting ITCM size to zero

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

flexRAM - problem setting ITCM size to zero

2,877 Views
nickwallis
Senior Contributor I

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!

 

Labels (1)
Tags (1)
0 Kudos
Reply
6 Replies

2,789 Views
nickwallis
Senior Contributor I

Bump ...... any comments please?

0 Kudos
Reply

2,787 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Nick,

My apologies. I’m inquiring internally as to what could be the cause of the ENET misbehavior when the ITCM is set to zero.

There seems to have been cases of a similar behavior on the i.MXRT1010 and the workaround was indeed to set the ITCM to 32K, but hopefully we can find the root cause internally so that this can be fixed.

I will let you know as soon as I have more information.

Regards,
Gustavo

0 Kudos
Reply

2,759 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Nickwallis,

My apologies for the delay. I misunderstood and apparently this error has not been seen and our experts confirmed that setting the ITCM size to zero should not have any effect on the Ethernet driver.

Is there any other variable that could be affecting the Ethernet module? Are you using the Ethernet driver from the i.MXRT SDK?

Regards,
Gustavo

0 Kudos
Reply

2,846 Views
nickwallis
Senior Contributor I

 Hi @gusarambula 

This is using RT106x, which as you know always has 512Kb of "fixed" OCRAM.

Therefore I am not using any of the flexRAM as OCRAM, the issue I have is remapping flexRAM usage from part ITCM/part DTCM to all DTCM.

-Nick

0 Kudos
Reply

2,874 Views
nickwallis
Senior Contributor I

Just to clarify, "build the code that works" means revert to flexRAM settings of DTCM = 480 kB and ITCM = 32 kB, as shown below.

	// IOMUXC_GPR_GPR14
	// configures DTCM total size (bits 23..20) and ITCM total size (bits 19..16)
	*((volatile unsigned int *)0x400AC038) = 0x00aa0000; // DTCM=512KB ITCM=512KB (not clear how much diff this makes?)

	// IOMUXC_GPR_GPR17
	// configures each flexRAM bank as either OCRAM, DTCM, ITCM or not used
	*((volatile unsigned int *)0x400AC044) = 0xaaaaaaab; // DTCM=480KB ITCM=32KB OCRAM=0KB

	// IOMUXC_GPR_GPR16
	*((volatile unsigned int *)0x400AC040) = 0x00200007; // use FLEXRAM_BANK_CFG to config, enable DTCM, enable ITCM
0 Kudos
Reply

2,853 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Nickwallis,

Would you please let us know which i.MXRT are you working with?

I ask because there is a limitation in some cases on the minimum OCRAM required, as listed on the Knowledge Base document below.

https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Reallocating-the-FlexRAM/ta-p/1117649

Regards,
Gustavo

0 Kudos
Reply