problems when writing data to flash on LS1046ARDB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

problems when writing data to flash on LS1046ARDB

Jump to solution
1,206 Views
uncoldice
Contributor II

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.

Labels (1)
Tags (1)
0 Kudos
1 Solution
1,021 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello uncoldice chen,

It seems that the RCW file which you used is not swapped, please use SDK 1703 release, the attached is the RCW file from SDK 1703, please refer to my following log.

=> tftp 85000000 wyp/ls1046ardb/rcw_1600_qspiboot.bin
Using e1000#0 device
TFTP from server 192.168.2.1; our IP address is 192.168.2.26
Filename 'wyp/ls1046ardb/rcw_1600_qspiboot.bin'.
Load address: 0x85000000
Loading: #
         0 Bytes/s
done
Bytes transferred = 168 (a8 hex)
=> md 0x85000000
85000000: 01ee0100 aa55aa55 0e000000 0c150010    ....U.U.........
85000010: 00000000 00000000 40005012 11335559    .........P.@YU3.
85000020: c1000000 40025000 00000000 00000000    .....P.@........
85000030: 00238800 00000000 00003101 20124000    ..#......1...@.
85000040: 00000001 00000096 40100000 0957015c    ...........@\.W.
85000050: 00000000 09570600 40100000 09570604    ......W....@..W.
85000060: 0000e010 09570178 00000008 09180000    ....x.W.........
85000070: 0000009e 09570418 0000009e 0957041c    ......W.......W.
85000080: 0000009e 09570420 80104e20 09eb1300    .... .W. N......
85000090: 00502880 09eb08dc 000f400c 09550000    .(P......@....U.
850000a0: 40006108 957deba3 deadbeef deadbeef    .a.@..}.........
850000b0: deadbeef deadbeef deadbeef deadbeef    ................
850000c0: deadbeef deadbeef deadbeef deadbeef    ................
850000d0: deadbeef deadbeef deadbeef deadbeef    ................
850000e0: deadbeef deadbeef deadbeef deadbeef    ................
850000f0: deadbeef deadbeef deadbeef deadbeef    ................
=> sf probe 0:1
SF: Detected s25fs512s with page size 512 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: 40006108 957deba3 ffffffff ffffffff    .a.@..}.........
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    ................
=>


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
1,022 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello uncoldice chen,

It seems that the RCW file which you used is not swapped, please use SDK 1703 release, the attached is the RCW file from SDK 1703, please refer to my following log.

=> tftp 85000000 wyp/ls1046ardb/rcw_1600_qspiboot.bin
Using e1000#0 device
TFTP from server 192.168.2.1; our IP address is 192.168.2.26
Filename 'wyp/ls1046ardb/rcw_1600_qspiboot.bin'.
Load address: 0x85000000
Loading: #
         0 Bytes/s
done
Bytes transferred = 168 (a8 hex)
=> md 0x85000000
85000000: 01ee0100 aa55aa55 0e000000 0c150010    ....U.U.........
85000010: 00000000 00000000 40005012 11335559    .........P.@YU3.
85000020: c1000000 40025000 00000000 00000000    .....P.@........
85000030: 00238800 00000000 00003101 20124000    ..#......1...@.
85000040: 00000001 00000096 40100000 0957015c    ...........@\.W.
85000050: 00000000 09570600 40100000 09570604    ......W....@..W.
85000060: 0000e010 09570178 00000008 09180000    ....x.W.........
85000070: 0000009e 09570418 0000009e 0957041c    ......W.......W.
85000080: 0000009e 09570420 80104e20 09eb1300    .... .W. N......
85000090: 00502880 09eb08dc 000f400c 09550000    .(P......@....U.
850000a0: 40006108 957deba3 deadbeef deadbeef    .a.@..}.........
850000b0: deadbeef deadbeef deadbeef deadbeef    ................
850000c0: deadbeef deadbeef deadbeef deadbeef    ................
850000d0: deadbeef deadbeef deadbeef deadbeef    ................
850000e0: deadbeef deadbeef deadbeef deadbeef    ................
850000f0: deadbeef deadbeef deadbeef deadbeef    ................
=> sf probe 0:1
SF: Detected s25fs512s with page size 512 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: 40006108 957deba3 ffffffff ffffffff    .a.@..}.........
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    ................
=>


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos