Problems when changing OCRAM size in Property settings?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Problems when changing OCRAM size in Property settings?

跳至解决方案
2,242 次查看
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???

 

 

标签 (1)
0 项奖励
回复
1 解答
2,209 次查看
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 项奖励
回复
2 回复数
2,210 次查看
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 项奖励
回复
2,208 次查看
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 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2002235%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9C%A8%E5%B1%9E%E6%80%A7%E8%AE%BE%E7%BD%AE%E4%B8%AD%E6%9B%B4%E6%94%B9%20OCRAM%20%E5%A4%A7%E5%B0%8F%E6%97%B6%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98%EF%BC%9F%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%3E%E6%88%91%E6%AD%A3%E5%9C%A8%E4%BD%BF%E7%94%A8%E5%B8%A6%E6%9C%89%20MIMXRT1010-EVK%20%E7%9A%84%20MCUXpress%20IDE%E3%80%82%3C%2FP%3E%3CP%3E%E6%88%91%E6%83%B3%E5%A2%9E%E5%8A%A0%20OCRAM%20%E7%9A%84%E5%B0%BA%E5%AF%B8%E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%B8%EF%BC%8C%E4%BD%86%E6%B2%A1%E6%9C%89%E5%A2%9E%E5%8A%A0%20OCRAM%EF%BC%8C%E5%9B%A0%E6%AD%A4%E4%B8%8D%E5%AD%98%E5%9C%A8%E9%87%8D%E5%8F%A0%E3%80%82%E8%AF%B7%E5%8F%82%E8%A7%81%E5%9B%BE%E7%89%87%E5%8F%B3%E4%B8%8B%E8%A7%92%E3%80%82%E7%BC%96%E8%AF%91%E5%99%A8%2F%E9%93%BE%E6%8E%A5%E5%99%A8%E6%8E%A5%E5%8F%97%E4%BA%86%E8%AF%A5%E4%BF%A1%E6%81%AF%E5%B9%B6%E4%B8%94%E4%BB%A3%E7%A0%81%E8%BF%90%E8%A1%8C%E3%80%82%3C%2FP%3E%3CP%3E%E4%BD%86%E6%88%91%E5%BD%93%E7%84%B6%E6%83%B3%E7%94%A8%200x8000%20%E6%9D%A5%E5%A2%9E%E5%8A%A0%20OCRAM%20%E7%9A%84%E5%A4%A7%E5%B0%8F%E3%80%82%E8%AF%A5%E6%80%8E%E4%B9%88%E5%81%9A%EF%BC%9F%EF%BC%9F%EF%BC%9F%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%E5%9C%A8%E5%B1%9E%E6%80%A7%E8%AE%BE%E7%BD%AE%E4%B8%AD%E6%9B%B4%E6%94%B9%20OCRAM%20%E5%A4%A7%E5%B0%8F%E6%97%B6%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2003446%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EPS%EF%BC%9A%E6%8A%B1%E6%AD%89%E6%88%91%E7%9A%84%E7%96%8F%E5%BF%BD%EF%BC%8C%E5%9B%A0%E4%B8%BA%E5%BF%85%E9%A1%BB%E6%98%AF2%E7%9A%84%E6%95%B4%E6%95%B0%E5%B9%82%EF%BC%8C%E9%82%A3%E4%B9%8896KB%E4%B9%9F%E4%B8%8D%E6%94%AF%E6%8C%81%EF%BC%8C%E6%89%80%E4%BB%A5%3CSTRONG%3E%E5%8F%AA%E6%9C%89%E4%B8%80%E4%B8%AA%E9%80%89%E9%A1%B9%3C%2FSTRONG%3E%EF%BC%8C128-0-0KB%E3%80%82%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%E5%9C%A8%E5%B1%9E%E6%80%A7%E8%AE%BE%E7%BD%AE%E4%B8%AD%E6%9B%B4%E6%94%B9%20OCRAM%20%E5%A4%A7%E5%B0%8F%E6%97%B6%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98%EF%BC%9F%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%3E%E6%84%9F%E8%B0%A2%E6%82%A8%E5%AF%B9%20NXP%20MIMXRT%20%E7%B3%BB%E5%88%97%E7%9A%84%E5%85%B3%E6%B3%A8%EF%BC%81%3C%2FP%3E%0A%3CP%3ENXP%20%E6%8F%90%E4%BE%9B%E4%BA%86%E8%AF%A6%E7%BB%86%E7%9A%84%20AN%20%E6%9D%A5%E6%8C%87%E5%AF%BC%E6%AD%A4%E6%93%8D%E4%BD%9C%EF%BC%8C%E8%AF%B7%E5%8F%82%E8%80%83%E3%80%82%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%3E%E5%85%B6%E4%B8%AD%E6%9C%89%E5%87%A0%E7%82%B9%E9%9C%80%E8%A6%81%E6%B3%A8%E6%84%8F%EF%BC%8C%E9%A6%96%E5%85%88%EF%BC%8C%E7%94%B1%E4%BA%8ETCM%E7%9A%84%E5%A4%A7%E5%B0%8F%E5%BF%85%E9%A1%BB%E6%98%AF2%E7%9A%84%E6%95%B4%E6%95%B0%E5%B9%82%EF%BC%8C%E5%B9%B6%E4%B8%94OCRAM%E5%BF%85%E9%A1%BB%E5%A4%A7%E4%BA%8E64KB%E3%80%82%E9%82%A3%E4%B9%88%EF%BC%8C%E5%A6%82%E6%9E%9C%E8%A6%81%E5%A2%9E%E5%8A%A0OCRAM%EF%BC%8C%E5%88%99%E5%BF%85%E9%A1%BB%E8%87%B3%E5%B0%91%E6%9C%89%E4%B8%80%E4%B8%AATCM%E7%9A%84%E5%80%BC%E4%B8%BA0%E3%80%82%E5%9B%A0%E6%AD%A4%EF%BC%8C%E8%AF%B7%E4%BB%8E%E4%BB%A5%E4%B8%8B%E4%B8%89%E4%B8%AA%E9%80%89%E9%A1%B9%E4%B8%AD%E9%80%89%E6%8B%A9%E9%80%82%E5%90%88%E6%82%A8%E7%9A%84%E9%85%8D%E7%BD%AE%E3%80%82%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%3E%E5%8F%A6%E5%A4%96%EF%BC%8C%E5%A6%82%E6%9E%9C%E6%9C%89TCM%E9%9C%80%E8%A6%81%E4%B8%BA0%EF%BC%8C%E9%82%A3%E4%B9%88%E5%BF%85%E9%A1%BB%E6%B3%A8%E6%84%8F%EF%BC%9A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3E%3CSPAN%3E%E5%A6%82%E6%9E%9C%E8%AF%B7%E6%B1%82%E7%9A%84%20ITCM%2FDTCM%20%E5%A4%A7%E5%B0%8F%E4%B8%BA%200%20%E5%AD%97%E8%8A%82%EF%BC%8C%E5%88%99%E7%A6%81%E7%94%A8%E7%9B%B8%E5%BA%94%E7%9A%84%20TCM%3C%2FSPAN%3E%3CBR%20role%3D%22presentation%22%20%2F%3E%20%3CSPAN%3EIOMUXC_GPR_GPR16-%26gt%3BINIT_xTCM_EN%20%E5%9C%A8%E5%B0%86%E5%A4%A7%E5%B0%8F%E9%85%8D%E7%BD%AE%E4%B8%BA%200%20%E5%AD%97%E8%8A%82%E4%B9%8B%E5%89%8D%3C%2FSPAN%3E%3CBR%20role%3D%22presentation%22%20%2F%3E%3CSPAN%3EIOMUXC_GPR_GPR14-%26gt%3BCM7_CFGxTCMSZ%E3%80%82%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3E%E6%9C%89%E5%85%B3%E6%9B%B4%E5%85%B7%E4%BD%93%E7%9A%84%E6%8C%87%E5%8D%97%EF%BC%8C%E5%8F%A6%E8%AF%B7%E5%8F%82%E9%98%85%E6%AD%A4%E5%B8%96%E5%AD%90%EF%BC%8C%E8%BF%99%E6%98%AF%E4%B8%80%E4%B8%AA%E5%BE%88%E5%A5%BD%E7%9A%84%E8%B5%B7%E7%82%B9%EF%BC%9A%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%3E%E9%87%8D%E6%96%B0%E5%88%86%E9%85%8D%20FlexRAM%20-%20NXP%20%E7%A4%BE%E5%8C%BA%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E6%AD%A4%E8%87%B4%EF%BC%8C%3CBR%20%2F%3E%E5%8A%A0%E6%96%87%3C%2FP%3E%3C%2FLINGO-BODY%3E