DTCM i.MXRT 1052 configuration

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

DTCM i.MXRT 1052 configuration

1,833 次查看
davidrozenski
Contributor I

Dear All,

I am using MIMXRT1050-EVK and would like to configure DTCM for 512 Kb at the first place of my software, I did the following : 

 

___writeMemory32(0x400AC040, 0x80000000); //IOMUXC_GPR_GPR16
___writeMemory32(0x400AC044, 0xAAAAAAAA);

 

but I get hardfault on the second line, any advise about this ?

 

I call these 2 lines just after clock init.

 

Regards

David

0 项奖励
回复
5 回复数

1,121 次查看
jay_heng
NXP Employee
NXP Employee

Best practice is to configure FlexRAM in Reset_Handler as below:

__iomux_gpr16_adr     EQU  0x400AC040
__iomux_gpr17_adr     EQU  0x400AC044

__flexram_bank_cfg    EQU  0xAAAAAAAA

Reset_Hanlder
    CPSID I                     ;关闭全局中断
    LDR R0,=__iomux_gpr17_adr
    MOV32 R1,__flexram_bank_cfg
    STR R1,[R0]
    LDR R0,=__iomux_gpr16_adr
    LDR R1,[R0]
    ORR R1,R1,#4
    STR R1,[R0]

 

0 项奖励
回复

1,122 次查看
jay_heng
NXP Employee
NXP Employee

Note that you need to configure IOMUXC_GPR_GPR17 before IOMUXC_GPR_GPR16, and why you configure IOMUXC_GPR_GPR16 as 0x80000000? it should be 0x00200007.

___writeMemory32(0x400AC044, 0xAAAAAAAA);//IOMUXC_GPR_GPR17

___writeMemory32(0x400AC040, 0x00200007); //IOMUXC_GPR_GPR16

0 项奖励
回复

1,124 次查看
jay_heng
NXP Employee
NXP Employee

As RT1050 only contains 512KB FlexRAM, not other dedicated OCRAM, so your application .data/.bss sections have to be resided in FlexRAM region.

In this case, you need to put FlexRAM configuration code before .data/.bss init process of your application, or there will be hardfault. because .data/.bss will be damaged after FlexRAM configuration.

0 项奖励
回复

1,131 次查看
ofirvn
Contributor I

do you have sample code or application node also for RT1166 and RT1172?

0 项奖励
回复

1,604 次查看
igorpadykov
NXP Employee
NXP Employee

Hi David

for configuration examples one can look at sect.2.1.1.2. Runtime

configuration AN12077 Using the i.MX RT FlexRAM
https://www.nxp.com/docs/en/application-note/AN12077.pdf

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复