LS1012 custom board, JTAG speed too low

cancel
Showing results for 
Search instead for 
Did you mean: 

LS1012 custom board, JTAG speed too low

Jump to solution
4,842 Views
nattapongsungch
Contributor III

Hi 

 

I'm try to connect to our LS1012 custom board reference design from LS1012AFDM.

First , I tested Connection Diagnostics with JTAG speed 16000 by default it's not working and error at IR Scan step.

Then , I reduce JTAG clock speed to 800. At 800kHz I can pass all Connection Diagnostics step.

 

Do you have any suggestion why it worked at JTAG low speed.

 

Regards.

Nattapong

Labels (1)
1 Solution
2,620 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Nattapong Sungcharoen,

I also encountered similar problem when recover an LS1012 demo board without RCW.

Please try whether the following would be helpful for you.

1. Please configure the target board to use hard-coded RCW, the signal CLK_OUT(R50) is used to configure RCW source. 0:hard-coded RCW. 1:QSPI.  Please refer to "Table 5. Configuration signals" in the attached document.

2. Please use the attached script to replace the one in
C:\Freescale\CW4NET_v2016.01\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_v2016.01\CW_ARMv8\ARMv8\gdb\bin.

4. Open gdb console in
C:\Freescale\CW4NET_v2016.01_armv8\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 rcw_800_swap.bin  --erase
fl_write 0x100000
u-boot-spl_swap.bin --erase
fl_write 0x200000 u-boot_swap.bin  --erase


Have a great day,
Yiping

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

View solution in original post

14 Replies
2,620 Views
nattapongsungch
Contributor III

Thank you for your answer. I will check my JTAG hardware design.

I'm not sure that is related with JTAG speed. I can do only Read QSPI such as DUMP but cannot Erase or Program.

During Erase or Program form CW Flash Programmer will not stop even Erase only 1 Byte. 

Thanks,

Nattapong

0 Kudos
2,620 Views
addiyi
NXP Employee
NXP Employee

Did you get any error when trying to erase/program?

Adrian

0 Kudos
2,620 Views
nattapongsungch
Contributor III

Hi Adrian,

I get debug error.

errorflash.PNG

Thanks,
Nattapong

0 Kudos
2,621 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Nattapong Sungcharoen,

I also encountered similar problem when recover an LS1012 demo board without RCW.

Please try whether the following would be helpful for you.

1. Please configure the target board to use hard-coded RCW, the signal CLK_OUT(R50) is used to configure RCW source. 0:hard-coded RCW. 1:QSPI.  Please refer to "Table 5. Configuration signals" in the attached document.

2. Please use the attached script to replace the one in
C:\Freescale\CW4NET_v2016.01\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_v2016.01\CW_ARMv8\ARMv8\gdb\bin.

4. Open gdb console in
C:\Freescale\CW4NET_v2016.01_armv8\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 rcw_800_swap.bin  --erase
fl_write 0x100000
u-boot-spl_swap.bin --erase
fl_write 0x200000 u-boot_swap.bin  --erase


Have a great day,
Yiping

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

2,620 Views
nattapongsungch
Contributor III

Hi Yiping, 

Thank you for your answer It's very helpful.

I did program RCW and U-boot successfully but cannot program PPA and Kernel (ITB 22MB).

Command that we are used. Image was download from ASK site.

fl_write 0x0 rcw_800_default_swap.bin  --erase

fl_write 0x100000 u-boot-2016.01-v201601.00.5-ls1012a-rdb-qspi_swap.bin --erase

fl_write 0x500000 ppa_swap-ls1012a_1.0.rc0-ls1012a-rdb.itb --erase                              

fl_write 0xA00000 itb-openwrt-ls1012a_1.0.rc0-ls1012a-lsrdb --erase                                       

Thanks,

Nattapong

0 Kudos
2,621 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Nattapong,

Please try to do flash programming under u-boot.

Thanks,

Yiping

2,621 Views
nattapongsungch
Contributor III

Thank you Yiping ,

I can programming all Images via CW.

Your answer very helpful.

0 Kudos
2,621 Views
addiyi
NXP Employee
NXP Employee

Despite this error, debugger connects to the board? 

Adrian

0 Kudos
2,621 Views
nattapongsungch
Contributor III

Hi Adrian,

No Error.

Thanks,

Nattapong

0 Kudos
2,621 Views
addiyi
NXP Employee
NXP Employee

What qspi device are you using on your board?

Adrian

0 Kudos
2,621 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Nattapong Sungcharoen,

Probably it is caused by RCW configuration.

Did you use hard-coded RCW during bringing up?


Have a great day,
Yiping

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

0 Kudos
2,623 Views
nattapongsungch
Contributor III

Hello Yiping,

Yes, I set USE_SAFE_RCW = True at Target init file.

initfile.PNG

Thank you

Nattapong

0 Kudos
2,623 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Nattapong,

Previously I could use CodeWarrior to connect to the demo board(LS1012AFDM or LS1012ARDB) with hard-coded RCW in the default JTAG clock 16000KHz.

Please check JTAG hardware design for your custom board.

Thanks,

Yiping

0 Kudos
2,623 Views
addiyi
NXP Employee
NXP Employee

LS1012 supports jtag speed up to 16000kHz using CWTAP. Are you using CWTAP or CMSIS-DAP interface? If using CWTAP you can check your board jtag design/implementation  to be similar with the one from LS1012FRDM.

Adrian

0 Kudos