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
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.