AnsweredAssumed Answered

Uboot from NAND flash works half the time

Question asked by jeremie on Feb 15, 2012
Latest reply on Jun 28, 2012 by James.Kosin

Hi,

 

My Uboot is stored in NAND FLASH and sometimes it starts, sometimes it does not. I have two examples: code "KO" does not boot, but code "OK" does. The difference? In a function ("drv_video_init") there are 13 "NOP" for KO and 15 "NOP" for OK. Nothing else.

 

Configuration:

-BF548

-uboot 2011R1-RC5

-small block NAND flash (256-byte page) / ECC activated

The "early debug print" indicates that the "KO" blocks after "initcode" function: all prints of initcode is printed on console. The next early prints are not visible for KO, but are properly got for OK. For information, the 13 or 15 NOP section is far away after all these early prints (call chain is: start/cpu_init_f/board_init_f/board_init_r/stdio_init/drv_video_init).

 

Unfortunelty, I have no accessible JTAG.

 

I have tried several other configurations of number of NOP (the two first ones correspond to above):

- if we have 13 NOP + (0    ) * 2NOP <=> + 0   bytes, then boot is KO

- if we have 13 NOP + (1    ) * 2NOP <=> + 4   bytes, then boot is OK

- if we have 13 NOP + (32   ) * 2NOP <=> + 128 bytes, then boot is OK

- if we have 13 NOP + (64   ) * 2NOP <=> + 256 bytes, then boot is OK

- if we have 13 NOP + (64+1 ) * 2NOP <=> + 260 bytes, then boot is OK

- if we have 13 NOP + (64+2 ) * 2NOP <=> + 264 bytes, then boot is OK

- if we have 13 NOP + (64+3 ) * 2NOP <=> + 268 bytes, then boot is OK

- if we have 13 NOP + (64+4 ) * 2NOP <=> + 272 bytes, then boot is KO

- if we have 13 NOP + (64+8 ) * 2NOP <=> + 288 bytes, then boot is KO

- if we have 13 NOP + (64+16) * 2NOP <=> + 320 bytes, then boot is KO

- if we have 13 NOP + (64+32) * 2NOP <=> + 384 bytes, then boot is KO

- if we have 13 NOP + (128  ) * 2NOP <=> + 512 bytes, then boot is KO

- if we have 13 NOP + (129  ) * 2NOP <=> + 516 bytes, then boot is OK

 

To conclude this observation, the Uboot works or not according to a "size period" of 512 bytes: for a size from X to X+264, it works; but for a size from X+268 to X+508, it fails.

 

Any idea where this bug (half the time uboot does not start) could come from?

If you have any suggestion to test, I can try with X, X+256 and X+384 to check that problem is over.

 

 

Thanks for your help!

 

Regards,

 

Jérémie

Outcomes