SDK example for SEMC hardfaults if change address

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

SDK example for SEMC hardfaults if change address

1,057 次查看
nickwallis
Senior Contributor I

Hi,

I have noticed that if you change the SEMC address for the SDK SEMC example project, then you get a hardfault. I am not sure why this is?

Steps to reproduce:

1. Import the SDK example project "semc"

2. Change the SEMC address from 0x80000000 to 0xA0000000 (you need to do this in 2 places, in file semc_sdram.c lines 18 and 58).

3. Rebuild the project and download to the board, debug.

The code ends up in MemManage_Handler() after the first sdram write on line 128 of semc_sdram.c

Please can you help?

We need to change the base address of the SEMC for reasons outlined in this thread:

https://community.nxp.com/t5/i-MX-Processors/IMXRT1050-SEMC-SRAM-16-bit-Write/m-p/790073

thanks

-Nick

标签 (1)
标记 (4)
0 项奖励
回复
1 回复

1,047 次查看
mjbcswitzerland
Specialist V

Hi Nick

Change

MPU->RBAR = ARM_MPU_RBAR(9, 0x80000000U);

at line 355 of board.c to

MPU->RBAR = ARM_MPU_RBAR(9, 0xa0000000U);

or

remove line 384

/* Enable MPU */
ARM_MPU_Enable(MPU_CTRL_PRIVDEFENA_Msk);

and then you will be OK.

Regards

Mark

P.S. It would be better if the value 0x80000000 were a global define rather than only affecting the SDRAM configuration.

0 项奖励
回复