cancel
Showing results for 
Search instead for 
Did you mean: 

Error Writing SLC NAND Flash - second half of each page contains repeated byte

david_s
Visitor

I am working on getting a new board design with a STM32MP153F to boot from parallel SLC NAND flash.  The flash chip is 1 GB, using the FMC interface with 16-bit I/O.  What happens when writing flash via STMCubeProgrammer is the first 2160 bytes of each page are written correctly, but after that byte 2160 is repeated until the end of the page, including through the OOB part of the page.  The page size is 4096 + 256 bytes.

As an example, I tried programming ARM Trusted Firmware at the beginning of flash.  If I read back a page from u-boot using the nand dump command, the first 2160 bytes match exactly what is in the file.  The remaining 2192 bytes will contain the same byte, whatever byte #2160 was.  This happens for every page written.  I get the same result if I write a page from the u-boot prompt using the nand write command.

For the device tree setup, I am following the STM32MP157A-EV1 as an example.

from the output from "nand info", the u-boot flash driver appears to be reading out the ONFI table correctly.

Device 0: nand0, sector size 256 KiB
Page size 4096 b
OOB size 256 b
Erase size 262144 b
ecc strength 8 bits
ecc step size 512 b
subpagesize 4096 b
options 0x00184202
bbt options 0x00060000

Any help is much appreciated.  Thanks!

0 REPLIES 0