MIMXRT1170 SEMC ,SDRAM ,MPU

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MIMXRT1170 SEMC ,SDRAM ,MPU

ソリューションへジャンプ
1,116件の閲覧回数
Charindu_Abeysekara
Contributor II

just clarify I'm referring to an example code to access SDRAM through MIMXRT1107 in the code it configure MPU in a following a sequence: disable d cache, cache present ,disable i cache, and Icache present and then access the region 9 setting , since im a fresher can someone please explain why there are following a procedure like above to configure MPU? (i have referred the referance mannual as well , but i didnt found anything )

0 件の賞賛
返信
1 解決策
1,103件の閲覧回数
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @Charindu_Abeysekara ,

Thanks for your interest in NXP MIMXRT series!

MPU can divide the memory into different areas and set different access rights and attributes for each area. Through reasonable configuration of MPU, critical memory areas can be protected from illegal access, thus improving system security and stability.

The steps followed in this code to configure the MPU are as follows.

  1. Disable (D-Cache) and (I-Cache). This is because if the cache is still open when configuring MPU, it may cause data inconsistency between the cache and memory, which may lead to unpredictable consequences. Therefore, it is better to disable them before configuring MPU.
  2. Disable the MPU. before reconfiguring the MPU, you need to disable it first.
  3. Configure the MPU settings for Region 9. The memory type, access rights, and other attributes of this region are set here. 
  4. After the configuration is completed, turn on the MPU to make it take effect.
  5. If caches were previously disabled, re-enable them here.

This rigorous configuration process is to ensure that when accessing critical memory areas, the expected memory properties and access rights are followed, preventing potential safety hazards or anomalies.

Best regards,
Gavin

元の投稿で解決策を見る

2 返答(返信)
1,104件の閲覧回数
Gavin_Jia
NXP TechSupport
NXP TechSupport

Hi @Charindu_Abeysekara ,

Thanks for your interest in NXP MIMXRT series!

MPU can divide the memory into different areas and set different access rights and attributes for each area. Through reasonable configuration of MPU, critical memory areas can be protected from illegal access, thus improving system security and stability.

The steps followed in this code to configure the MPU are as follows.

  1. Disable (D-Cache) and (I-Cache). This is because if the cache is still open when configuring MPU, it may cause data inconsistency between the cache and memory, which may lead to unpredictable consequences. Therefore, it is better to disable them before configuring MPU.
  2. Disable the MPU. before reconfiguring the MPU, you need to disable it first.
  3. Configure the MPU settings for Region 9. The memory type, access rights, and other attributes of this region are set here. 
  4. After the configuration is completed, turn on the MPU to make it take effect.
  5. If caches were previously disabled, re-enable them here.

This rigorous configuration process is to ensure that when accessing critical memory areas, the expected memory properties and access rights are followed, preventing potential safety hazards or anomalies.

Best regards,
Gavin

1,100件の閲覧回数
Charindu_Abeysekara
Contributor II
Thanks in advance
0 件の賞賛
返信