Hi,
I'm having an issue writing in the s28hs512t xSPI nor on the am64 evm from U-Boot. To be more specific I can't write/erase/update the integrated nor using sf commands. sf probe and read works normally though. Of course it also means that I can't save my env in the NOR, which is ultimately what I'm trying to achieve.
=> sf probe
SF: Detected s28hs512t with page size 256 Bytes, erase size 256 KiB, total 64 MiB
=> sf erase 0 100
SF: 256 bytes @ 0x0 Erased: ERROR
=> sf update $loadaddr 0 100
device 0 offset 0x0, size 0x100
0 bytes written, 256 bytes skipped in 0.2s, speed 52428 B/s
=> sf write $loadaddr 0 100
device 0 offset 0x0, size 0x100
jedec_spi_nor flash@0: flash operation timed out
SF: 256 bytes @ 0x0 Written: ERROR -110
=> sf read $loadaddr 0 100
device 0 offset 0x0, size 0x100
SF: 256 bytes @ 0x0 Read: OK
=> md.w $loadaddr 100
82000000: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
82000010: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
82000020: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
82000030: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
82000040: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
82000050: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
82000060: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
82000070: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
82000080: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
82000090: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
820000a0: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
820000b0: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
820000c0: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
820000d0: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
820000e0: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
820000f0: 2563 2563 2563 2563 2563 2563 2563 2563 c%c%c%c%c%c%c%c%
82000100: 5355 0b31 0930 0306 0455 0c08 5402 3158 US1.0...U....TX1
82000110: 300f 060d 5503 0704 060c 6144 6c6c 7361 .0...U....Dallas
82000120: 2731 2530 0306 0455 0c0a 541e 7865 7361 1'0%..U....Texas
82000130: 4920 736e 7274 6d75 6e65 7374 4920 636e Instruments Inc
82000140: 726f 6f70 6172 6574 3164 3013 0611 5503 orporated1.0...U
82000150: 0b04 0a0c 7250 636f 7365 6f73 7372 1331 ....Processors1.
82000160: 1130 0306 0455 0c03 540a 2049 7553 7070 0...U....TI Supp
82000170: 726f 3174 301d 061b 2a09 4886 f786 010d ort1.0...*.H....
82000180: 0109 0e16 7573 7070 726f 4074 6974 632e ....support@ti.c
82000190: 6d6f 8230 2202 0d30 0906 862a 8648 0df7 om0.."0...*.H...
820001a0: 0101 0501 0300 0282 000f 8230 0a02 8202 ..........0.....
820001b0: 0102 bf00 ae14 d849 727f 6bd3 cd23 48eb ......I..r.k#..H
820001c0: 650e 22dc f24d 4f0e f682 b5ed ddf2 7cdb .e."M..O.......|
820001d0: fa91 596e d5ff b6f7 04de 8a1d d2cc d995 ..nY............
820001e0: e0d1 c1c4 50f8 ffbf 0c48 2291 9a50 7b4c .....P..H.."P.L{
820001f0: f38b 0a96 2628 a4b3 e0d9 55a9 1a41 3efb ....(&.....UA..>
Interestingly my device boots from xSPI, meaning the NOR itself is ok. To flash boot binaries I'm using flashcp from my custom yocto based OS and things work very well. That distribution is based on the Kirkstone branch of the meta-ti and meta-arago layers.
I customized a U-Boot defconfig, based on the am64x_evm_a53_defconfig by adding:
CONFIG_CMD_PART=y CONFIG_CMD_MBR=y CONFIG_BOOTCOUNT_LIMIT=y CONFIG_BOOTCOUNT_ENV=y CONFIG_SYS_BOOTCOUNT_MAGIC=0xB001C041 CONFIG_BOOTCOUNT_BOOTLIMIT=4 CONFIG_CMD_BOOTMENU=y CONFIG_AUTOBOOT_KEYED=y CONFIG_AUTOBOOT_STOP_STR="abc" CONFIG_DEFAULT_SPI_BUS=0 CONFIG_DEFAULT_SPI_MODE=0 CONFIG_SPI_BOOT=y # CONFIG_ENV_IS_IN_MMC is not set # CONFIG_SPL_ENV_IS_IN_MMC is not set CONFIG_ENV_IS_IN_SPI_FLASH=y CONFIG_VERSION_VARIABLE=y CONFIG_ENV_OFFSET=0x700000 CONFIG_ENV_SECT_SIZE=0x20000 CONFIG_ENV_OFFSET_REDUND=0x740000 CONFIG_ENV_ADDR=0x0 CONFIG_ENV_SECT_SIZE_AUTO=y CONFIG_ENV_SPI_BUS=0 CONFIG_ENV_SPI_CS=0 CONFIG_ENV_SPI_MAX_HZ=100000 CONFIG_ENV_SPI_MODE=0x0 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_CMD_MTDPARTS=y CONFIG_CMD_MTDPARTS_SPREAD=y CONFIG_CMD_MTDPARTS_SHOW_NET_SIZES=y CONFIG_CMD_CLONE=y CONFIG_CMD_MTD=y CONFIG_CMD_SF_TEST=y CONFIG_CMD_SPI=y
I doubt that anything in there is likely to cause my issue. especially knowing that I observe similar issues using the binaries from the SDK 08.02.00.23.
Any suggestion or idea is welcome.
Regards
Pierre