i.MX287 and WINCE boot mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX287 and WINCE boot mode

1,214 Views
fear_nada
Contributor II

Hi all.

I am use wince and i.mx287.

in eboot i have some strange code:

....

    // This will depend on the boot mode

    g_bNandBootloader = TRUE;

    g_bSDHCBootloader = FALSE;

    // check for SDBoot

    if ( ((*(PBYTE)((DWORD)pbOCRAM + OCRAM_BOOT_MODE_OFFSET)) & BOOT_MODE_MASK) == BOOT_MODE_SDMMC)

    {

        g_bSPIBootloader  = FALSE;   

        g_bNandBootloader = FALSE;

        g_bSDHCBootloader = TRUE;

        RETAILMSG(1, (L"INFO: Booted from SD/MMC\r\n"));

    }

   

    // check for SPIBoot

    if ( ((*(PBYTE)((DWORD)pbOCRAM + OCRAM_BOOT_MODE_OFFSET)) & BOOT_MODE_MASK) == BOOT_MODE_SPI)

    {

        g_bNandBootloader = FALSE;

        g_bSDHCBootloader = FALSE;

        g_bSPIBootloader  = TRUE;

        RETAILMSG(1, (L"INFO: Booted from SPI Flash\r\n"));

    }

...

OCRAM_BOOT_MODE_OFFSET and others defined as

#ifndef BSP_SI_VER_TO1_0

#define OCRAM_BOOT_MODE_OFFSET      0x19BF0

#else

#define OCRAM_BOOT_MODE_OFFSET      0x1A7F0

#endif

#define BOOT_MODE_MASK              0xF

#define BOOT_MODE_SDMMC             0x9

#define BOOT_MODE_SPI               0x2

on all my boards i select boot mode by pullup\pulldown LCD_Dx pins

on all my boards i select BOOT MODE - NAND 3.3V (LCD_D4=0, LCD_D3=0, LCD_D2=1, LCD_D1=0, LCD_D0=0)

But on some board i got this messages "INFO: Booted from SPI Flash".

Why?

i am add debug in eboot code like this:

    {

     unsigned value;       

       

       

        RETAILMSG(1,(TEXT("at address(%x) data = %x\r\n"),((unsigned)((DWORD)pbOCRAM + OCRAM_BOOT_MODE_OFFSET)) ,*((PBYTE)((DWORD)pbOCRAM + OCRAM_BOOT_MODE_OFFSET)) ));

   

   

    DDKIomuxSetPinMux(DDK_IOMUX_LCD_D0,  DDK_IOMUX_MODE_GPIO);

    DDKIomuxSetPinMux(DDK_IOMUX_LCD_D1,  DDK_IOMUX_MODE_GPIO);

    DDKIomuxSetPinMux(DDK_IOMUX_LCD_D2,  DDK_IOMUX_MODE_GPIO);

    DDKIomuxSetPinMux(DDK_IOMUX_LCD_D3,  DDK_IOMUX_MODE_GPIO);

    DDKIomuxSetPinMux(DDK_IOMUX_LCD_D4,  DDK_IOMUX_MODE_GPIO);

    DDKIomuxSetPinMux(DDK_IOMUX_LCD_D5,  DDK_IOMUX_MODE_GPIO);

    DDKIomuxSetPinMux(DDK_IOMUX_LCD_D6,  DDK_IOMUX_MODE_GPIO);

    DDKGpioReadDataPin(DDK_IOMUX_LCD_D0,&value);

    RETAILMSG(1,(TEXT("DDK_IOMUX_LCD_D0 =  : %x\r\n"), value));

    DDKGpioReadDataPin(DDK_IOMUX_LCD_D1,&value);

    RETAILMSG(1,(TEXT("DDK_IOMUX_LCD_D1 =  : %x\r\n"), value));

    DDKGpioReadDataPin(DDK_IOMUX_LCD_D2,&value);

    RETAILMSG(1,(TEXT("DDK_IOMUX_LCD_D2 =  : %x\r\n"), value));

    DDKGpioReadDataPin(DDK_IOMUX_LCD_D3,&value);

    RETAILMSG(1,(TEXT("DDK_IOMUX_LCD_D3 =  : %x\r\n"), value));

    DDKGpioReadDataPin(DDK_IOMUX_LCD_D4,&value);

    RETAILMSG(1,(TEXT("DDK_IOMUX_LCD_D4 =  : %x\r\n"), value));

    DDKGpioReadDataPin(DDK_IOMUX_LCD_D5,&value);

    RETAILMSG(1,(TEXT("DDK_IOMUX_LCD_D5 =  : %x\r\n"), value));

    DDKGpioReadDataPin(DDK_IOMUX_LCD_D6,&value);

    RETAILMSG(1,(TEXT("DDK_IOMUX_LCD_D6 =  : %x\r\n"), value));

    }

and i take this in terminal:

at address(a801a7f0) data = c2

DDK_IOMUX_LCD_D0 =  : 0

DDK_IOMUX_LCD_D1 =  : 0

DDK_IOMUX_LCD_D2 =  : 1

DDK_IOMUX_LCD_D3 =  : 0

DDK_IOMUX_LCD_D4 =  : 0

DDK_IOMUX_LCD_D5 =  : 0

DDK_IOMUX_LCD_D6 =  : 0

So my question: what is this OCRAM_BOOT_MODE_OFFSET and why eboot use this? may be this is code wrong?


Labels (2)
0 Kudos
1 Reply

776 Views
karina_valencia
NXP Apps Support
NXP Apps Support

Deactivated user can you help on this case?

0 Kudos