OpenNuvoton / NUC970_U-Boot_v2016.11

U-Boot v2016.11 for NUC970, N9H30, and NUC980
29 stars 45 forks source link

NUC980 Cannot boot from SPI NAND when bad block #38

Closed hongduc10 closed 2 years ago

hongduc10 commented 2 years ago

I have an issue when boot from SPI NAND flash. The windbond flash is bad block at 0,1,2,3 (block contained Uboot SPL) so system cannot boot.

image

Are there any solution?

ychuang3 commented 2 years ago

Please provide enough information. The type name of SPI NAND, and how do you program the images. And please provide the complete boot meesage log in text.

hongduc10 commented 2 years ago

SPI NAND: W25N01GV Programmer: Nu writer

This is actually the output of boot message.

image

If I program the image on the good PCBA or the NUC980-IIoT DK, the system can not (show the Uboot SPL log).

ychuang3 commented 2 years ago

I just want make sure if the SPI-NAND bad block a false alram. Generally, manufacture should guarantee the NAND flash block 0 be a good block. NUC980 IBR (Internal Boot ROM) boots NAND flash based on this. If SPI-NAND flash block 0 is a bad block, NUC980 cannot boot from SPI.

hongduc10 commented 2 years ago

Thank you @ychuang3,

May be I have to check the NAND flash.

I want to ask another case, when the bad block is at block I programed u-boot/uImage(kernel), is this handled by u-boot SPL/Uboot respectively?

ychuang3 commented 2 years ago

As I know, bab blocks are flagged at manufacturing. In case of block 1 is a bad block, NuWriter should be able to detect and skip it when programming the flash. The SPL can detect and skip it, too. Logically, the block number are still contiguous, but physically skip the bad blocks.

hongduc10 commented 2 years ago

Thank you @ychuang3 let me check more about the reason why the SPI NAND have bad block on block 0

hongduc10 commented 2 years ago

Hi @ychuang3, I have found the different part number of SPI NAND Flash

NUC980 IIoT-DK: W25N01GVZEIT (BUF=1 Buffer Read Mode, default when power up, BUF can be written to 0) Our PCBA: W25N01GVZEIG (BUF=0 Continuous Read Mode, default when power up, BUF can be written to 1)

So by default, NUC980 Boot ROM will only handle BUF=1 Buffer Read Mode ?

ychuang3 commented 2 years ago

Yes, NUC980 IBR support buffer mode only. Continuous read mode is not supported.

hongduc10 commented 2 years ago

Thank you @ychuang3 .