- I have been tasked to find the root cause and fix an issue in a custom design board based on imx28.
- imx28 fails to boot from NAND and goes to USB recovery mode.
- Issue arises after changing the NAND flash to a different NAND flash.
- Upon looking into the changes in the NAND drives, I found that the 'starting sequence' of the new replacement NAND drive takes 100x more time to finish than the old one (the old one takes ~10us and the new one takes ~1ms). I suspect that this causes to fail the boot from the NAND and go to USB recovery mode.
- I replaced the 'reset capacitor' of the imx28 with another capacitor that has much more capacitance, effectively delaying the imx28 startup. This fixes the NAND boot issue. This convinced me that imx28 trying to access the NAND drive before the NAND drive finishes its starting sequence and that's what causes the issue.
- Linux-126.96.36.199 and the u-boot-2009.08 sources are used to build the binaries for the system.
- I have been trying to pinpoint the location in the bootloader source files where it begins to access the NAND drive so that I can implement a delay as a software fix for the issue. So far I have failed to find that.
- Am I on the right track? Are there any parameters I can change in any config files to increase the boot delay? In the source files, where can I find the entry point to the NAND access?
Solved! Go to Solution.
Thank you for your reply.
We were able to load the u-boot and the kernel from the NAND drive before. The issue arose after the NAND drive gets replaced with a different NAND drive. After the NAND replacement, the board goes to the USB recovery mode if (and only if) it is connected to a PC with a USB cable. If it is not connected to the PC with a USB cable, it boots up from the NAND drive as intended. But for our purpose, it is necessary to have the board connected to the PC with the USB all the time.
As I am trying to find out why this happens I found out from the datasheets of the NAND drives that the power on sequences of the two NAND drives are different. The new replacement takes more time to get ready to accept commands from the imx28. Here is the old NAND: K9F2808U0C Here is the new NAND: MX30LF1G18AC
To test this theory I replaced the reset capacitor of the imx28 with a higher capacitance capacitor. This is to slow down the imx28 so that the NAND has time to finish its power-up sequence. It worked! Now the board boots up from the NAND drive while plugged into the PC with the USB. But I like to implement a software fix rather than replacing the capacitor. Is there any way I can get to slow down the imx28 boot ROM before it accesses NAND?