31
NXPTM M522XX, KINETIS and i.MX RT / Re: Serial Loader: Placing vars into SDRAM?
« Last post by jackking on February 06, 2024, 01:00:33 AM »OK, that is similar to what I tried, without success.
I set the following in config.h of uTaskerBoot:
I set the following in app_hw_iMX.h of uTaskerSerialBoot:
and added your routine as a menu item under "rd" for RAM DUMP:
Which instantly crashes when trying to write past 0x20 bytes. It also crashes immediately on the read back of the first byte, if I write less than 0x20 bytes.
I set the following in config.h of uTaskerBoot:
Code: [Select]
#define BOOT_LOADER_SUPPORTS_SDRAM
I set the following in app_hw_iMX.h of uTaskerSerialBoot:
Code: [Select]
#define SDRAM_SIZE (32 * 1024 * 1024) // 32MByte
#define BOOT_LOADER_SUPPORTS_SDRAM
#define SDRAM_START_ADDRESS 0x80000000
#define DISABLE_SDRAM_CACHE
#define SEMC_AVAILABLE
and added your routine as a menu item under "rd" for RAM DUMP:
Code: [Select]
else if ((ucSerialDebugInputMessage[0] == 'r')
|| (ucSerialDebugInputMessage[0] == 'R')) {
if ((ucSerialDebugInputMessage[1] == 'd')
|| (ucSerialDebugInputMessage[1] == 'D')) {
fnDebugMsg("\r\nWrite SDRAM: ");
unsigned char *ptrSDRAM = (unsigned char *)SDRAM_ADDR;
unsigned long ulTestCnt = (4 * 1024 * 1024);
unsigned char ucByte = 0;
while (ulTestCnt-- != 0) {
*ptrSDRAM++ = ucByte++;
}
fnDebugMsg("\r\nDump SDRAM: ");
ptrSDRAM = (unsigned char *)SDRAM_ADDR;
ulTestCnt = (4 * 1024 * 1024);
while (ulTestCnt-- != 0) {
fnDebugHex((unsigned char) *ptrSDRAM++, (sizeof(unsigned char)));
}
break;
}
}
Which instantly crashes when trying to write past 0x20 bytes. It also crashes immediately on the read back of the first byte, if I write less than 0x20 bytes.