Hi Dao
assumes you boot your board from MicroSD card:
1. Copy your qspi-nor-flash setup uboot image and attatched "qspi-header.bin" into a VFAT partition of MicroSD card(e.g. the 3rd partition , there is uboot image file "u-boot-qspi.imx" and "qspi-header.bin" saved) .
2. Boot your board from MicroSD card and enter uboot command shell prompt line.
3. Enter command "fatls mmc 1:3" and you can see the two files in MicroSD copyed before.then enter command
"fatload mmc 1:3 ${loadaddr} u-boot-qspi.imx"
4. Enter command "sf probe"
5. The erase size is ${filesize}, around 351 Kbytes. This example assumes that it is 512 Kbytes.
Enter command "sf erase 0x0 0x80000"
6. Enter command "sf write ${loadaddr} 0x1000 0x80000 " /* flash uboot.imx to 4k offset of qspi nor flash */
7. Enter command "fatload mmc 1:3 0x90000000 qspi-header.bin"
8. Enter command "sf write 0x90000000 0x400 0x200" /* flash qspi-header.bin to 1k offset of qspi nor flash, 512 bytes size */
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------