[U-Boot] SPI-flash write problem with SST25VF016B
Nikita Kiryanov
nikita at compulab.co.il
Thu Jun 9 13:25:11 CEST 2016
We assembled a CM-T43 module with the SST25VF016B SPI-flash, and the write
command does not work. Reads and erases execute without reporting an
error, but the write command fails and appears to place the chip into
some undefined state.
The chip works in Linux, and if I program SPL/U-Boot to the SPI flash
from Linux, the bootrom is able to boot it. It seems that only U-Boot
has troubles with it.
I did some of the easy poking around (add delays, change operating
speed, experimentee with mux settings (pullups/pulldowns)), but it
wasn't helpful. Any ideas what may be wrong?
See log below:
U-Boot SPL 2016.07-rc1-dirty (Jun 08 2016 - 14:18:19)
Trying to boot from MMC1
U-Boot 2016.07-rc1-dirty (Jun 08 2016 - 14:18:19 +0300)
I2C: ready
DRAM: 1 GiB
PMIC: TPS65218
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
SF: Got idcodes
00000000: bf 25 41 bf 25 .%A.%
SF: Detected SST25VF016B with page size 256 Bytes, erase size 4 KiB,
total 2 MiB
Hit any key to stop autoboot: 0
CM-T43 #
CM-T43 #
CM-T43 #
CM-T43 # sf probe
SF: Got idcodes
00000000: bf 25 41 bf 25 .%A.%
SF: Detected SST25VF016B with page size 256 Bytes, erase size 4 KiB,
total 2 MiB
CM-T43 # sf read 80a00000 0 4000
device 0 offset 0x0, size 0x4000
SF: 16384 bytes @ 0x0 Read: OK
CM-T43 # sf erase 0 4000
SF: erase 20 0 0 0 (0)
SF: erase 20 0 10 0 (1000)
SF: erase 20 0 20 0 (2000)
SF: erase 20 0 30 0 (3000)
SF: 16384 bytes @ 0x0 Erased: OK
CM-T43 # sf write 80a00000 0 4000
device 0 offset 0x0, size 0x4000
WP[02]: 0x80a00000 => cmd = { 0xad 0x000000 }
SPI RXS timed out, status=0x00000000
WP[ffffffff]: 0x80a00002 => cmd = { 0xad 0x000002 }
SPI TXS timed out, status=0x00000000
SF: Failed to send command (1 bytes): -1
SF: sst word program failed
SF: sst: program failure 16384 bytes @ 0x0
SF: 16384 bytes @ 0x0 Written: ERROR -1
CM-T43 # sf erase 0 4000
SF: erase 20 0 0 0 (0)
SF: erase 20 0 10 0 (1000)
SF: erase 20 0 20 0 (2000)
SF: erase 20 0 30 0 (3000)
SF: 16384 bytes @ 0x0 Erased: OK
CM-T43 # sf write 80a00000 0 4000
device 0 offset 0x0, size 0x4000
WP[42]: 0x80a00000 => cmd = { 0xad 0x000000 }
SPI RXS timed out, status=0x00000000
WP[ffffffff]: 0x80a00002 => cmd = { 0xad 0x000002 }
SPI TXS timed out, status=0x00000000
SF: Failed to send command (1 bytes): -1
SF: sst word program failed
SF: sst: program failure 16384 bytes @ 0x0
SF: 16384 bytes @ 0x0 Written: ERROR -1
CM-T43 # sf read 80a00000 0 4000
device 0 offset 0x0, size 0x4000
SF: 16384 bytes @ 0x0 Read: OK
CM-T43 # sf write 80a00000 0 4000
device 0 offset 0x0, size 0x4000
WP[42]: 0x80a00000 => cmd = { 0xad 0x000000 }
SPI RXS timed out, status=0x00000000
WP[ffffffff]: 0x80a00002 => cmd = { 0xad 0x000002 }
SPI TXS timed out, status=0x00000000
SF: Failed to send command (1 bytes): -1
SF: sst word program failed
SF: sst: program failure 16384 bytes @ 0x0
SF: 16384 bytes @ 0x0 Written: ERROR -1
CM-T43 # sf probe
SF: Got idcodes
00000000: 00 00 00 00 00 .....
SF: Unsupported flash IDs: manuf 00, jedec 0000, ext_jedec 0000
Failed to initialize SPI flash at 0:0
More information about the U-Boot
mailing list