I'm working on imx25 booting from a NAND flash using internal boot.
I started with the evaboard(3 stack), and i downloaded and compiled redboot, everything is working fine, even my aplication (it is a proprietary os with embedded application) is working and i tested it for several weeks).
On the evaboard there is a samsung NAND flash.
then we designed and built our board, on it we put a micron NAND flash. We used a smaller NAND flash due to cost and because we don't need a bigger one for our application.
we tested the board and we are able to use it in UART/USB dowload mode (bootmode=11), so i erased the micron flasg (it is supported by ATK toolkit V1.70) programmed and checked back, i tried also to dump it and everything is fine.
Then i tried to boot from it (as i did on evaboard), but it doesn't work. (bootmode=00)
I checked so many time the BT_ pins used to configure all the boot parameters nad they seems to be ok.... but it doesn't boot. i checked the signal on the nand and i see some access on the nand bus, i think it is the first 4K read, but nothing more. if a look at the signal on the evaboard i see a veru long read access : of course the rom boot download the 0x40000 size redboot image.
On my board the processore go into uart/usb boot again , as the refererence manual sais it happen when the rom boot find some kind of error in the image downloaded... but i odn' have any security option enabled, i'm using the same image on the evaboard and on my board.
I asked at redboot maintainers and there is no dependence of the code about nand type or model.
and also i think the image it is not staring at all, because i don't see the image read from the nand to the ram... So it is something wrong on the flash header (but it works on the evaboard) or in my BT settings....
There is any dependence in the flash header about NAND type or model?
we are using the MT29F1G08ABADA
it is a 1Gb 8bit SLC nand flash 2K page
So I configured the BT_ pins in the following way:
BT_MEM_TYPE= 01 (the micron should be a 4 address cycle .... but on the reference manula say that the boot rom access as 5 address.... see page 7-48 of teh reference. but it is not clear at all...
anyway i tried with both 4 and 5 address cycles... but it doesn't boot anyway.
BT_USB_SRC=00 (don't care in my situatin)
BT_SPARE_SIZE=0 (should dont' care because it is a setting for 4K page for 2K page is fized)...
BT_SRC=00 (don't care in my situation)
BT_LPB_FREQ=000 (the same of the evaboard).
so what could be wrong ?something to change in the flash header table due to different NAND?
please help me.
Last item, on the reference manual says that when there is an error during the ROM boot pahse it log the errors at a specific address. but i could not find how to access it....
I solved it,
the problem was in redboot DCD, taking it from the evaboard there was no NFC configuration due to the fact that the default settings are ok for the samsung NAND present on the board, but our NAND has 64 pages block instead of 128 pages block (the default of NFC), so i added on the dcd the configuration of the registers of the NFC , program the NAND without BI swap, it boot correclty now.
Maybe you can burn the freescale demo redboot internal boot image to the board, after you set boot mode to internal boot and reboot the board, if it always boot to UART/USB dowload mode, then it means the NAND hasn't been burned successfuly. If the board will not run to UART/USB dowload mode, then it means internal boot from NAND is OK, your issue maybe is DDR related.
if i program the micron nand flash using the STK toolkit with BI swap checked it seem to boot, I mean i can see the read phase of the rom Boot from nand to ddr, but still i don't have the redboot console..
on the 3stack evaboard was not necessary to program the nand with that flag.