Problems when changing OCRAM size in Property settings?

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

Problems when changing OCRAM size in Property settings?

Jump to solution
2,004 Views
simmania
Contributor IV

Hi,

I'm using MCUXpress IDE with the MIMXRT1010-EVK.

I want to increase the size of the OCRAM. The ITCM and DTCM can be somewhat smaller.
I did fill in new sizes in the Properties of the project at C/C++ Build -> MCU Settings.
But the application crashes or values are not accepted.

See the attached picture.

The top-left MCU-settings in the picture are the original setting.
I decreased the ITCM and DTCM sizes and increase the OCRAM as in the top-right settings in the picture. The compiler/linker seems to accept this but when running the application, it crashes. The function HardFault_Handler(void) is called even before the first breakpoint in main.

Note that I decreased the RAM3 base address because it may not overlap RAM4. And increasing the RAM4 base address results in the error that the size is 0! See bottom-left in the picture. the strange thing is that the size of RAM4 originally was also 0!

As a test I decreased the ITCM and DTCM sizes without increasing the OCRAM so that no overlap exists. See bottom-right in the picture. This is accepted by the compiler/linker and the code runs.

But off course I want to increase the OCRAM size with 0x8000. How to do this???

 

 

Labels (1)
0 Kudos
Reply
1 Solution
1,971 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your interest in NXP MIMXRT series!

NXP provides a detailed AN to guide this operation, please refer to it. 
https://www.nxp.com/docs/en/application-note/AN12077.pdf

There are a few notes in it, firstly, since the size of the TCM must be an integer power of 2 and the OCRAM must be greater than 64KB. then, if you want to increase the OCRAM, there must be at least one TCM that has a value of 0. Therefore, please choose the configuration that is right for you from the following three options.

Gavin_Jia_0-1732776685129.png

Also, if there is a TCM that needs to be 0, then it must be noted:

If the requested ITCM/DTCM size is 0 Bytes, disable the corresponding TCM in
IOMUXC_GPR_GPR16->INIT_xTCM_EN before configuring the size to 0 Bytes in
IOMUXC_GPR_GPR14->CM7_CFGxTCMSZ.

For a more specific guide, see also this post, which is a good place to start: Reallocating the FlexRAM - NXP Community

 

Best regards,
Gavin

View solution in original post

0 Kudos
Reply
2 Replies
1,972 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your interest in NXP MIMXRT series!

NXP provides a detailed AN to guide this operation, please refer to it. 
https://www.nxp.com/docs/en/application-note/AN12077.pdf

There are a few notes in it, firstly, since the size of the TCM must be an integer power of 2 and the OCRAM must be greater than 64KB. then, if you want to increase the OCRAM, there must be at least one TCM that has a value of 0. Therefore, please choose the configuration that is right for you from the following three options.

Gavin_Jia_0-1732776685129.png

Also, if there is a TCM that needs to be 0, then it must be noted:

If the requested ITCM/DTCM size is 0 Bytes, disable the corresponding TCM in
IOMUXC_GPR_GPR16->INIT_xTCM_EN before configuring the size to 0 Bytes in
IOMUXC_GPR_GPR14->CM7_CFGxTCMSZ.

For a more specific guide, see also this post, which is a good place to start: Reallocating the FlexRAM - NXP Community

 

Best regards,
Gavin

0 Kudos
Reply
1,970 Views
Gavin_Jia
NXP TechSupport
NXP TechSupport

PS: Sorry for my oversight, since it has to be an integer power of 2, then 96KB is also not supported, so there is only one option, 128-0-0KB.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2002235%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EProblems%20when%20changing%20OCRAM%20size%20in%20Property%20settings%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2002235%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI'm%20using%20MCUXpress%20IDE%20with%20the%20MIMXRT1010-EVK.%3C%2FP%3E%3CP%3EI%20want%20to%20increase%20the%20size%20of%20the%20OCRAM.%20The%20ITCM%20and%20DTCM%20can%20be%20somewhat%20smaller.%3CBR%20%2F%3EI%20did%20fill%20in%20new%20sizes%20in%20the%20Properties%20of%20the%20project%20at%20C%2FC%2B%2B%20Build%20-%26gt%3B%20MCU%20Settings.%3CBR%20%2F%3EBut%20the%20application%20crashes%20or%20values%20are%20not%20accepted.%3C%2FP%3E%3CP%3ESee%20the%20attached%20picture.%3C%2FP%3E%3CP%3EThe%20top-left%20MCU-settings%20in%20the%20picture%20are%20the%20original%20setting.%3CBR%20%2F%3EI%20decreased%20the%20ITCM%20and%20DTCM%20sizes%20and%20increase%20the%20OCRAM%20as%20in%20the%20top-right%20settings%20in%20the%20picture.%20The%20compiler%2Flinker%20seems%20to%20accept%20this%20but%20when%20running%20the%20application%2C%20it%20crashes.%20The%20function%20%3CSPAN%3EHardFault_Handler(void)%3C%2FSPAN%3E%20is%20called%20even%20before%20the%20first%20breakpoint%20in%20main.%3CBR%20%2F%3E%3CBR%20%2F%3ENote%20that%20I%20decreased%20the%20RAM3%20base%20address%20because%20it%20may%20not%20overlap%20RAM4.%20And%20increasing%20the%20RAM4%20base%20address%20results%20in%20the%20error%20that%20the%20size%20is%200!%20See%20bottom-left%20in%20the%20picture.%20the%20strange%20thing%20is%20that%20the%20size%20of%20RAM4%20originally%20was%20also%200!%3C%2FP%3E%3CP%3EAs%20a%20test%20I%20decreased%20the%20ITCM%20and%20DTCM%20sizes%20without%20increasing%20the%20OCRAM%20so%20that%20no%20overlap%20exists.%20See%20bottom-right%20in%20the%20picture.%20This%20is%20accepted%20by%20the%20compiler%2Flinker%20and%20the%20code%20runs.%3C%2FP%3E%3CP%3EBut%20off%20course%20I%20want%20to%20increase%20the%20OCRAM%20size%20with%200x8000.%20How%20to%20do%20this%3F%3F%3F%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2002235%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MXRT%20101x%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2003446%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20Problems%20when%20changing%20OCRAM%20size%20in%20Property%20settings%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2003446%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EPS%3A%20Sorry%20for%20my%20oversight%2C%20since%20it%20has%20to%20be%20an%20integer%20power%20of%202%2C%20then%2096KB%20is%20also%20not%20supported%2C%20so%20there%20is%20%3CSTRONG%3Eonly%20one%20option%3C%2FSTRONG%3E%2C%20128-0-0KB.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2003444%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20Problems%20when%20changing%20OCRAM%20size%20in%20Property%20settings%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2003444%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3EThanks%20for%20your%20interest%20in%20NXP%20MIMXRT%20series!%3C%2FP%3E%0A%3CP%3ENXP%20provides%20a%20detailed%20AN%20to%20guide%20this%20operation%2C%20please%20refer%20to%20it.%26nbsp%3B%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN12077.pdf%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fapplication-note%2FAN12077.pdf%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EThere%20are%20a%20few%20notes%20in%20it%2C%20firstly%2C%20since%20the%20size%20of%20the%20TCM%20must%20be%20an%20integer%20power%20of%202%20and%20the%20OCRAM%20must%20be%20greater%20than%2064KB.%20then%2C%20if%20you%20want%20to%20increase%20the%20OCRAM%2C%20there%20must%20be%20at%20least%20one%20TCM%20that%20has%20a%20value%20of%200.%20Therefore%2C%20please%20choose%20the%20configuration%20that%20is%20right%20for%20you%20from%20the%20following%20three%20options.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Gavin_Jia_0-1732776685129.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Gavin_Jia_0-1732776685129.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F313031i952F9400112B32C2%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Gavin_Jia_0-1732776685129.png%22%20alt%3D%22Gavin_Jia_0-1732776685129.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EAlso%2C%20if%20there%20is%20a%20TCM%20that%20needs%20to%20be%200%2C%20then%20it%20must%20be%20noted%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3E%3CSPAN%3EIf%20the%20requested%20ITCM%2FDTCM%20size%20is%200%20Bytes%2C%20disable%20the%20corresponding%20TCM%20in%3C%2FSPAN%3E%3CBR%20role%3D%22presentation%22%20%2F%3E%3CSPAN%3EIOMUXC_GPR_GPR16-%26gt%3BINIT_xTCM_EN%20before%20configuring%20the%20size%20to%200%20Bytes%20in%3C%2FSPAN%3E%3CBR%20role%3D%22presentation%22%20%2F%3E%3CSPAN%3EIOMUXC_GPR_GPR14-%26gt%3BCM7_CFGxTCMSZ.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EFor%20a%20more%20specific%20guide%2C%20see%20also%20this%20post%2C%20which%20is%20a%20good%20place%20to%20start%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-RT-Crossover-MCUs-Knowledge%2FReallocating-the-FlexRAM%2Fta-p%2F1117649%22%20target%3D%22_blank%22%3EReallocating%20the%20FlexRAM%20-%20NXP%20Community%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20regards%2C%3CBR%20%2F%3EGavin%3C%2FP%3E%3C%2FLINGO-BODY%3E