BootROM
RM0082
832/844
Doc ID 018672 Rev 1
Figure 115. Serial NOR Flash boot
38.5.2 NAND
Flash
boot
To detect NAND devices, initialize the FSMC controller with the relaxed timing values.
●
Thiz = 0x01;
●
Thold = 0x04;
●
Twait = 0x06;
●
Tset = 0x00;
Boot ROM code reads the device ID code and looks for it in a table which contains all
supported devices code. Then, it fills a device description structure for page_size,
block_size, memory size & spare command according to this ID code.
Then it searches for X-Loader in the first page of every block of the Flash starting from 1st
block.
It checks the sanity of the block before reading the block by reading the 1st word of spare
area of every block. It should be 0xFF. If bad then skip to next block.
Read the whole page in a buffer (buffer size equals page size) & search for X-Loader. If
found, return start address. Find the transfer size from the header. Calculate the number of
pages & start reading the pages from the Flash & copy them into the shadow memory. Next
step is to authenticate X-Loader. If authenticated then jump to the start address, else jump
to USB boot.
While reading check ECC for every page, Read ECC from the NAND memory spare area
and from the FSMC controller, if error of 1 bit, fix it else return Boot failed.
U - boot present in first
sector of flash
BootROM
bypass
NO
Authenticate X - Loader?
Copy X - Loader from flash to shadow memory
Jump (at ih_load) to X-Loader in shadow memory
Passed
YES
Jump to U - boot
(i 0x40)
Failed
USB boot