shany cohen

Loading image to NAND in imx28

Discussion created by shany cohen on Jul 26, 2012
Latest reply on Jul 29, 2012 by shany cohen

Hello,

I'm trying to load an image to NAND  in imx28.

In the function -

OEMVerifyMemory(DWORD dwStartAddr, DWORD dwLength)

[PLATFORM\iMX28-EVK-PDK1_9\SRC\BOOTLOADER\COMMON\main.c]

The addresses parameters are: dwStartAddr = 0x87F00000,

dwPhysVerifyStart = 0x47F00000, length = 0xF971140.

These addresses will result in loading image to SD in the following values -

KITLOutputDebugString("INFO: Downloading NK SD/MMC image.\r\n");

g_ImageType = IMAGE_TYPE_NK;

g_ImageMemory = IMAGE_MEMORY_SD;

My question is this - if I want to change the load to NAND instead of SD, the addresses have to be changed. I don't understand entirely why there values are the way they are and where exactly they are set (the dwStartAddr).  

If I insert the following code at the top of this function - OEMVerifyMemory(DWORD dwStartAddr, DWORD dwLength):

DWORD* pdwStartAddr = &dwStartAddr;

dwPhysVerifyStart = IMAGE_BOOT_NKIMAGE_NAND_PA_START;

dwPhysVerifyEnd = dwPhysVerifyStart + dwLength - 1;

pdwStartAddr = OALPAtoCA(dwPhysVerifyStart);

dwStartAddr = *pdwStartAddr;

 

Now I see that the flash is indeed programmed, however, when reset - nothing happens, the system isn't re-boot as if there is nothing in the NAND.

 

Am I doing this procedure correctly?

Thanks

Shany, 

Outcomes