QSPI Flash update failed LS1012ARDB

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

QSPI Flash update failed LS1012ARDB

2,151 Views
devchandil
Contributor II

I have a LS1012ARDB Board with me. Using flex-builder I have prepared a build for yocto-devel using following commands:

 

flex-builder -i mkrfs -r yocto:devel

flex-builder -i mkfw -m ls1012ardb

flex-builder -i mkboot

 

Post this inside the build/images folder a file is created named "firmware_ls1012ardb_qspiboot.img". Using tftp server I provided this file to the board. I tried to upgrade the QSPI Flash using the command

"sf erase 0 +$filesize && sf write 0xa0000000 0 $filesize"

Post this there was no response from the console. Post board reset also the board did not responded. Could anyone help me how can I bring back my board from this failure?

Tags (2)
0 Kudos
16 Replies

2,144 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the following table to switch LS1012ARDB to QSPI flash bank2 to check whether there is u-boot at QSPI flash bank2.

yipingwang_2-1645606720473.png

If no, please use CodeWarrior to do recovery. Please switch to QSPI flash bank1.

yipingwang_3-1645607008776.png

Please refer to section "7.7 Using flash programmer from eclipse IDE" in C:\Freescale\CW4NET_v2020.06\CW_ARMv8\ARMv8\Help\PDF\ARMv8_Targeting_Manual.pdf to do flash programming with CodeWarrior for ARMv8.

You also could refer to the first section in the following document.

https://community.nxp.com/t5/CodeWarrior-for-QorIQ-Knowledge/Use-CodeWarrior-for-ARMv8-to-Debug-U-bo...

In addition, you could use the pre-built image downloaded with the following command.

wget https://www.nxp.com/lgfiles/sdk/lsdk2108/firmware_ls1012ardb_qspiboot.img

 

0 Kudos

2,131 Views
devchandil
Contributor II

Hi There,

I tried to upgrade my bank 2 with the file you provided in the link with the following command

sf erase 0 +$filesize && sf write 0xa0000000 0 $filesize

 

Post run of this command, now my bank2 is also not responding and board does not boot up. Could you help in how to get recover the flash without codewarrior. Or is there any other way to factory reset the board.

0 Kudos

2,117 Views
yipingwang
NXP TechSupport
NXP TechSupport

You have to do the recovery with CodeWarrior, please refer to the following procedure.

1. Please configure the target board to use hard-coded RCW. Please configure SW1 [1] as "0" on LS1012ARDB.

 

2. Please use the attached script to replace the one in
C:\Freescale\CW4NET_v2020.06\CW_ARMv8\ARMv8\gdb_extensions\flash\cwflash.py.
Probably you need to modify this script according to your requirement. For example, you use other connection type, the default is CodeWarrior TAP with USB connection.

3. Please put images files in
C:\Freescale\CW4NET_v2020.06\CW_ARMv8\ARMv8\gdb\bin.

4. Open gdb console in
C:\Freescale\CW4NET_v2020.06\CW_ARMv8\ARMv8\gdb\bin\aarch64-fsl-gdb.exe,
please execute the following commands to do flash programming.

source ../../gdb_extensions/flash/cwflash.py
fl_unprotect 0x0 0x4000000
fl_write 0x0 firmware_ls1012ardb_qspiboot.img --erase

0 Kudos

2,087 Views
devchandil
Contributor II

Hi,

I do not have codewarrior tap. Is there any way I could use the console port of my evaluation board?

0 Kudos

2,072 Views
yipingwang
NXP TechSupport
NXP TechSupport

You could use CMSIS DAP instead of CodeWarrior TAP.

 

SW1 [7] 

0- LS1012A UART1 is connected to K22 UART0 for CMSIS
DAP debug. (default)
1 - LS1012A UART1 is translated to RS232 levels and is
available on 1x3 header (J24).

 

For details, please refer to "LS1012A Reference Design Board Manual", which could be downloaded from the following link.

https://www.nxp.com/design/qoriq-developer-resources/layerscape-ls1012a-reference-design-board:LS101...

 

0 Kudos

2,064 Views
devchandil
Contributor II

Hi yipingwang,

 

I am getting following error when trying to run the cwfash script you provided.

I have modified following in your probe_connection tab: PROBE_CONNECTION = "cmsisdap"

Following is my witch configuration: SW1: 00100100. SW2: 00000000

error messageerror message

0 Kudos

2,059 Views
yipingwang
NXP TechSupport
NXP TechSupport

In cwflash.py, please specify "JTAG_SPEED = 6000".

0 Kudos

2,057 Views
devchandil
Contributor II

Hi, I was able to connect to the target successfully.

But when I try to write the file. Erase failed with the error seen in the picture attached. Also, I want to know should I change USE_SAFE_RCW = False from False to TrueCapture_gdb.PNG

0 Kudos

2,049 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please try whether you could write the attached ATF image to QSPI flash of the target board.

fl_unprotect 0x0 0x4000000
fl_write 0x0 bl2_qspi.pbl --erase

fl_write 0x100000 fip_uboot.bin --erase

0 Kudos

2,037 Views
devchandil
Contributor II

Hi, the commands you provided worked fine and now the board boots up and is reading the OS from the SD Card. Could you tell me how can I move the OS from SD Card to emmc and boot from emmc instead of SDCard

0 Kudos

2,016 Views
yipingwang
NXP TechSupport
NXP TechSupport

You could refer to LSDK 21.08 user guide to deploy images to EMMC card, the procedure is same as deploying SD card.

You could create a new thread to discuss more if needed.

 

0 Kudos

1,886 Views
devchandil
Contributor II

Hi,

I want to understand that why the ATF firmware is able to flash but for the earlier firmware I am getting write error.

0 Kudos

2,044 Views
devchandil
Contributor II

HI,

 

Following commands you provided executed without any error:

 

fl_unprotect 0x0 0x4000000
fl_write 0x0 bl2_qspi.pbl --erase

fl_write 0x100000 fip_uboot.bin --erase

0 Kudos

2,055 Views
yipingwang
NXP TechSupport
NXP TechSupport

No need  change USE_SAFE_RCW = False from False to True, you have already configured the switch setting to use hard-coded RCW now.

0 Kudos

2,048 Views
devchandil
Contributor II

ok, but any solution for the error which I am getting when trying to write the flash. I am getting following error

 

Flash programming operation failed.

//

Additional error details:

[FP: can't write memory]

0 Kudos

2,140 Views
devchandil
Contributor II

Hi yipingwang,

Post dip switch change my board boots up from bank2 with the message Board: LS1012ARDB Version: unknown, boot from QSPI: bank2 

 

I want to know how I can recover my Bank1. Also, I am new to this ecosystem, so is there any dev guide which I can refer to for the development on the LS1012A.

0 Kudos