U-boot IMX6SoloX Flashing M4 Image onto QSPI Nor Flash MT25Q02G

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

U-boot IMX6SoloX Flashing M4 Image onto QSPI Nor Flash MT25Q02G

899 Views
niranjanbc
Contributor IV

Hi I am flashing M4 image from SD card onto QSPI Flash using "update_m4_from_sdcard", when read the Flash back i see all Ulong are swapped and they are stored in little enddian format. below is the U-boot console

run update_m4_from_sd
SF: Detected MT25Q2048 with page size 256 Bytes, erase size 4 KiB, total 256 MiB
reading m4_qspi.bin
47606 bytes read in 19 ms (2.4 MiB/s)
SF: 65536 bytes @ 0x0 Erased: OK
SF: 47606 bytes @ 0x0 Written: OK
=> sf probe 1:0
SF: Detected MT25Q2048 with page size 256 Bytes, erase size 4 KiB, total 256 MiB
=> md 0x70000000
70000000: 01040070 00800020 712b0070 712b0070    p... ...p.+qp.+q
70000010: 712b0070 712b0070 00000000 712b0070    p.+qp.+q....p.+q
70000020: 00000000 00000000 3f2a0070 00000000    ........p.*?....
70000030: 00000000 712b0070 712b0070 b52a0070    ....p.+qp.+qp.*.
70000040: 712b0070 712b0070 712b0070 712b0070    p.+qp.+qp.+qp.+q
70000050: 712b0070 712b0070 712b0070 712b0070    p.+qp.+qp.+qp.+q
70000060: 712b0070 712b0070 712b0070 712b0070    p.+qp.+qp.+qp.+q
70000070: 712b0070 712b0070 712b0070 712b0070    p.+qp.+qp.+qp.+q
70000080: 712b0070 712b0070 712b0070 712b0070    p.+qp.+qp.+qp.+q
70000090: 712b0070 712b0070 712b0070 712b0070    p.+qp.+qp.+qp.+q
700000a0: 712b0070 712b0070 712b0070 712b0070    p.+qp.+qp.+qp.+q
700000b0: 712b0070 712b0070 712b0070 712b0070    p.+qp.+qp.+qp.+q
700000c0: 712b0070 712b0070 712b0070 712b0070    p.+qp.+qp.+qp.+q
700000d0: 712b0070 712b0070 712b0070 712b0070    p.+qp.+qp.+qp.+q
700000e0: 712b0070 712b0070 712b0070 712b0070    p.+qp.+qp.+qp.+q
700000f0: 712b0070 712b0070 712b0070 712b0070    p.+qp.+qp.+qp.+q
=>

in the above memory read 0x01040070 and 0x00800020 are swapped and endian is little.

actually it should be this way 0x20008000 0x70000410.

if store the image to DDR or OCRAM and read it back it read fine like below.

=> fatload mmc 1:1 0x00901000 m4_qspi.bin
reading m4_qspi.bin
47606 bytes read in 18 ms (2.5 MiB/s)
=> md 0x00901000
00901000: 20008000 70000401 70002b71 70002b71    ... ...pq+.pq+.p
00901010: 70002b71 70002b71 70002b71 00000000    q+.pq+.pq+.p....
00901020: 00000000 00000000 00000000 70002a3f    ............?*.p
00901030: 70002b71 00000000 70002ab5 70002b71    q+.p.....*.pq+.p
00901040: 70002b71 70002b71 70002b71 70002b71    q+.pq+.pq+.pq+.p
00901050: 70002b71 70002b71 70002b71 70002b71    q+.pq+.pq+.pq+.p
00901060: 70002b71 70002b71 70002b71 70002b71    q+.pq+.pq+.pq+.p
00901070: 70002b71 70002b71 70002b71 70002b71    q+.pq+.pq+.pq+.p
00901080: 70002b71 70002b71 70002b71 70002b71    q+.pq+.pq+.pq+.p
00901090: 70002b71 70002b71 70002b71 70002b71    q+.pq+.pq+.pq+.p
009010a0: 70002b71 70002b71 70002b71 70002b71    q+.pq+.pq+.pq+.p
009010b0: 70002b71 70002b71 70002b71 70002b71    q+.pq+.pq+.pq+.p
009010c0: 70002b71 70002b71 70002b71 70002b71    q+.pq+.pq+.pq+.p
009010d0: 70002b71 70002b71 70002b71 70002b71    q+.pq+.pq+.pq+.p
009010e0: 70002b71 70002b71 70002b71 70002b71    q+.pq+.pq+.pq+.p
009010f0: 70002b71 70002b71 70002b71 70002b71    q+.pq+.pq+.pq+.p
=>

is there anything i am missing with QSPI NOR flash configuration.

i have updated sf_param.c file to support MT25Q02G has below.

  {"MT25Q2048",       0x20ba22, 0x0,       64 * 1024,  4096, RD_FULL,         WR_QPP | SECT_4K},

Labels (4)
0 Kudos
4 Replies

648 Views
prasanthr
Contributor II

HI niranjan,

           I got into your issue. I like to know some more information from your side. which will help me to solve your issue.

1. link of your community source and freescale release source, (i.e) to confirm the versions 

2. could you run your application with community version with both QSPI flash and OCRAM? and I believe that you said it is working fine with qspi and ocram of release version.

0 Kudos

648 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi niranjanbc,

It is possible that the commands for the flash memory that you are using are different than the commands used in update_m4_from_sd script, in this case you need to modify the script according to the flash memory you are using.

On the other hand I would suggest to double check the schematic connections as it is possible that the data lines are inverted.

I hope this helps.


Regards,
Carlos

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

0 Kudos

648 Views
niranjanbc
Contributor IV

Hi Carlos,

i am seeing the above issue with Freescale community version of U-boot(U-boot FSLC)

if i use freescale release version of U-boot (U-boot Imx) on the same board, and just update sf_param.c

it works fine, i dont see any issue. so i dont think there is a hardware issue or update_m4_from_sd script issue.

thanks

Niranjan

0 Kudos

648 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi niranjanbc,

thank you for clarifying that this issue is with the community u-boot.

Please note that the community that develop these tools is external to NXP, so we do not provide support on such tools. If you need support on any of the community's releases you may subscribe the FSL Community BSP mailing list at FSL Community BSP  to talk directly with the developers and other users.


Regards,
Carlos

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

0 Kudos