AnsweredAssumed Answered

problems when writing data to flash on LS1046ARDB

Question asked by uncoldice chen on Jun 20, 2017
Latest reply on Jun 25, 2017 by Yiping Wang

Hi,

 

I am following the document "QorIQ-SDK-2.0-1702-IC-Rev0.pdf" section " 4.4.8.8 Programming a New U-Boot, RCW and FMan Ucode" to update the RCW on vBank4 on the board.

 

Below is the steps:

=> tftp 85000000 ls1/rcw_1600_qspiboot.bin
Using FM1@DTSEC5 device
TFTP from server 192.168.0.1; our IP address is 192.168.0.3
Filename 'ls1/rcw_1600_qspiboot.bin'.
Load address: 0x85000000
Loading: #
11.7 KiB/s
done
Bytes transferred = 168 (a8 hex)
=> md 85000000
85000000: 55aa55aa 0001ee01 1000150c 0000000e .U.U............
85000010: 00000000 00000000 59553311 12500040 .........3UY@.P.
85000020: 00500240 000000c1 00000000 00000000 @.P.............
85000030: 00000000 00882300 00401220 01310000 .....#.. .@...1.
85000040: 96000000 01000000 5c015709 00001040 .........W.\@...
85000050: 00065709 00000000 04065709 00001040 .W.......W..@...
85000060: 78015709 10e00000 00001809 08000000 .W.x............
85000070: 18045709 9e000000 1c045709 9e000000 .W.......W......
85000080: 20045709 9e000000 0013eb09 204e1080 .W. ..........N
85000090: dc08eb09 80285000 00005509 0c400f00 .....P(..U....@.
850000a0: 40006108 957deba3 deadbeef deadbeef .a.@..}.........

=> sf probe 0:1
SF: Detected S25FL512S_256K with page size 256 Bytes, erase size 256 KiB, total 64 MiB
=> sf erase 0 +$filesize
SF: 262144 bytes @ 0x0 Erased: OK
=> sf write 85000000 0 $filesize
device 0 offset 0x0, size 0xa8
SF: 168 bytes @ 0x0 Written: OK
=> md 44000000
44000000: 01ee0100 aa55aa55 0e000000 0c150010 ....U.U.........
44000010: 00000000 00000000 40005012 11335559 .........P.@YU3.
44000020: c1000000 40025000 00000000 00000000 .....P.@........
44000030: 00238800 00000000 00003101 20124000 ..#......1...@.
44000040: 00000001 00000096 40100000 0957015c ...........@\.W.
44000050: 00000000 09570600 40100000 09570604 ......W....@..W.
44000060: 0000e010 09570178 00000008 09180000 ....x.W.........
44000070: 0000009e 09570418 0000009e 0957041c ......W.......W.
44000080: 0000009e 09570420 80104e20 09eb1300 .... .W. N......
44000090: 00502880 09eb08dc 000f400c 09550000 .(P......@....U.
440000a0: a3eb7d95 08610040 ffffffff ffffffff .}..@.a.........

 

We can see that after sf write, the written data on VBank4 is not same as stored in DDR address 85000000. It seems to have a endian swap issue.

 

However, if I use below command to copy data from VBank0 to VBank4, there is no problems, all the data OK.

=> md 40000000
40000000: 55aa55aa 0001ee01 1000150c 0000000e .U.U............
40000010: 00000000 00000000 59553311 12500040 .........3UY@.P.
40000020: 00500240 000000c1 00000000 00000000 @.P.............
40000030: 00000000 00882300 00401220 01310000 .....#.. .@...1.
40000040: 96000000 01000000 5c015709 00001020 .........W.\ ...
40000050: 00065709 00000000 04065709 00001040 .W.......W..@...
40000060: 78015709 10e00000 00001809 08000000 .W.x............
40000070: 18045709 9e000000 1c045709 9e000000 .W.......W......
40000080: 20045709 9e000000 0013eb09 204e1080 .W. ..........N
40000090: dc08eb09 80285000 40006108 9f51fba8 .....P(..a.@..Q.
=> sf erase 0 +$filesize
SF: 262144 bytes @ 0x0 Erased: OK
=> md 44000000
44000000: ffffffff ffffffff ffffffff ffffffff ................
44000010: ffffffff ffffffff ffffffff ffffffff ................
44000020: ffffffff ffffffff ffffffff ffffffff ................
44000030: ffffffff ffffffff ffffffff ffffffff ................
44000040: ffffffff ffffffff ffffffff ffffffff ................
44000050: ffffffff ffffffff ffffffff ffffffff ................
44000060: ffffffff ffffffff ffffffff ffffffff ................
44000070: ffffffff ffffffff ffffffff ffffffff ................
44000080: ffffffff ffffffff ffffffff ffffffff ................
44000090: ffffffff ffffffff ffffffff ffffffff ................
440000a0: ffffffff ffffffff ffffffff ffffffff ................
440000b0: ffffffff ffffffff ffffffff ffffffff ................
440000c0: ffffffff ffffffff ffffffff ffffffff ................
440000d0: ffffffff ffffffff ffffffff ffffffff ................
440000e0: ffffffff ffffffff ffffffff ffffffff ................
440000f0: ffffffff ffffffff ffffffff ffffffff ................
=> sf write 40000000 0 $filesize
device 0 offset 0x0, size 0xa8
SF: 168 bytes @ 0x0 Written: OK
=> md 44000000
44000000: 55aa55aa 0001ee01 1000150c 0000000e .U.U............
44000010: 00000000 00000000 59553311 12500040 .........3UY@.P.
44000020: 00500240 000000c1 00000000 00000000 @.P.............
44000030: 00000000 00882300 00401220 01310000 .....#.. .@...1.
44000040: 96000000 01000000 5c015709 00001020 .........W.\ ...
44000050: 00065709 00000000 04065709 00001040 .W.......W..@...
44000060: 78015709 10e00000 00001809 08000000 .W.x............
44000070: 18045709 9e000000 1c045709 9e000000 .W.......W......
44000080: 20045709 9e000000 0013eb09 204e1080 .W. ..........N
44000090: dc08eb09 80285000 40006108 9f51fba8 .....P(..a.@..Q.
440000a0: ffffffff ffffffff ffffffff ffffffff ................
440000b0: ffffffff ffffffff ffffffff ffffffff ................
440000c0: ffffffff ffffffff ffffffff ffffffff ................
440000d0: ffffffff ffffffff ffffffff ffffffff ................
440000e0: ffffffff ffffffff ffffffff ffffffff ................
440000f0: ffffffff ffffffff ffffffff ffffffff ................

 

The U-Boot version is: U-Boot 2016.012.0+gb4635e3 (Sep 24 2016 - 19:16:25 +0800)

 

Please help to check and suggest what the cause of the problem. Thanks.

Outcomes