SDK example for SEMC hardfaults if change address

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

SDK example for SEMC hardfaults if change address

1,058件の閲覧回数
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,048件の閲覧回数
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 件の賞賛
返信