Hi,
In my project, the hardware platform CPU is RM48L950, the software development platform is IAR. I use the RM48L950's EMIF interface to external expand SRAM which has an address space of 2MB, 8Bit data bus . I want to run the program on this SRAM. So, in sys_startup.c, in the void _c_int00 (void) function, increase _mpuInit_ () and _mpuEnable_ () function above the _coreInitRegisters_ () function, increase SRAM initialization function SramInit() above the __cmain() function. as follows:
void _c_int00(void)
{
/* USER CODE BEGIN (5) */
/* USER CODE END */
_mpuInit_();
_mpuEnable_();
/* Initialize Core Registers to avoid CCM Error */
_coreInitRegisters_();
......
esmInit();
/* USER CODE BEGIN (75) */
SramInit();
/* USER CODE END */
/* call the application */
__cmain();
}
I declare a static object initialised with a pattern, place it in the SRAM. code follows:
static unsigned int myinittest[ 2 ] =
{
0x01234567,
0x89abcdef
}
However, when the target file is downloaded to the board, myinittest array is not correctly initialized. the initialization result:
myinittest[0] = 0x23456700
myinittest[1] = 0xabcdef00
Can you tell me why? I need your help.
Best regards.