ls102x CMSIS-DAP JTAG chain issue

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

ls102x CMSIS-DAP JTAG chain issue

3,269 Views
andrey_knnv
Contributor III

Hi All,

I have ls1021atwr and custom board which is very close to ls1021atwr by design.

I can attach to ls1021atwr from CW via CMSIS-DAP with no errors,

but if I use the same way for connecting to custom board CW hungs at 82% point

for at about 3 min. I get "Failed to correctly configure the JTAG chain" message after.

I can see all JTAG signals (TDI,TDO,TMS,TCK,TRTS) on oscilloscope during connection progress.

It looks like there is no difference.

Can anyone point me how to figure out what is going wrong?

 Thank you.

Tags (1)
25 Replies

1,987 Views
andrey_knnv
Contributor III

Hi All,

Just FYI: after a lot of sleepless nights the problem was localized.

Now I can say definitely:

CMSISDAP Firmware version: 0201 DOESN'T WORK with ls1020a rev2.0.

CMSISDAP Firmware version: 0203 DOES       WORK with ls1020a rev2.0.

Voila!

I've got working CMSISDAP on our custom board.

0 Kudos

1,987 Views
noisycricket
Contributor II

I seem to be having the same problem, but with the original LS1021A_TWR.  The CMSISDAP Firmware that shipped with it on the USB stick is 0201.  Where can I find the 0203 version?

(bin) 25 % config cc cmsisdap
Identified CMSIS-DAP SERNUM: 20000201C5041E0238FAC1FA
Firmware version: 0201
0: CMSIS-DAP (cmsisdap) CC software ver. {0.4}
(bin) 26 % ccs::config_chain {ls1020a cmsisdap}

## this hangs for a while before printing the next message, LED2 blinking quickly 
LS1020A: Core not responding

0 Kudos

1,987 Views
sinanakman
Senior Contributor III

Hi Andrey

While you are looking for an answer for your CMSISDAP related issues, I am just curious why do you prefer CMSISDAP over JTAG. You seemed to have a working JTAG connection so I was wondering what advantage do you see to use CMSISDAP in your case.

Thanks and best regards

Sinan Akman

0 Kudos

1,987 Views
andrey_knnv
Contributor III

Hi Sinan,

There are two problems:

1. I have JLink probe which is not supported by CodeWarrior.

2. I have CodeWarrior USB TAP which has label "MPC8360EA-MDS-PB" on the back and I can't get it working with CW 10.0.7 up to  10.0.9. I'm getting "CCSProtocolPlugin : Could not connect to the probe (or other debug link)" although CCS works with it via low-level commands.

It is a reason why I'm trying CMSISDAP.

1,988 Views
andrey_knnv
Contributor III

Well,

We've planned to use CMSISDAP for u-boot and Linux kernel bringup on our custom board.

Now kernel is working on our board but CMSISDAP still isn't.

It's funny a bit.

I'm getting "CC driver failure" always on ls1021atwr ever:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

loading history file ... 26 events added
CodeWarrior Connection Server console display active (Tcl8.4.12 / Tk8.4.12)
Loading CCSAPI Tcl interface (C:/Freescale/CW_ARMv7_v10.0.7/ARMv7/ccs/bin/ccstcl.dll)...
Loading Svfburner (C:/Freescale/CW_ARMv7_v10.0.7/ARMv7/ccs/bin/svfburner.dll)...
There are no command converters configured
Server listening on port: 41475
Clients allowed from all hosts
No clients denied
(bin) 27 % config cc cmsisdap
Identified CMSIS-DAP SERNUM: 20000201C3063E573EF8E1AF
Firmware version: 0201
0: CMSIS-DAP (cmsisdap) CC software ver. {0.3}
(bin) 28 % ccs::config_chain testcore
(bin) 29 % jtag::lock
(bin) 30 % jtag::reset_tap 1
(bin) 31 % jtag::reset_tap 1
(bin) 31 % jtag::scan_io ir 64 -1
CC driver failure
(bin) 32 %

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CCS crashes constantly for the followings commands (using ls1021atwr):

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

loading history file ... 26 events added
CodeWarrior Connection Server console display active (Tcl8.4.12 / Tk8.4.12)
Loading CCSAPI Tcl interface (C:/Freescale/CW_ARMv7_v10.0.7/ARMv7/ccs/bin/ccstcl.dll)...
Loading Svfburner (C:/Freescale/CW_ARMv7_v10.0.7/ARMv7/ccs/bin/svfburner.dll)...
There are no command converters configured
Server listening on port: 41475
Clients allowed from all hosts
No clients denied
(bin) 27 % config cc cmsisdap
Identified CMSIS-DAP SERNUM: 20000201C3063E573EF8E1AF
Firmware version: 0201
0: CMSIS-DAP (cmsisdap) CC software ver. {0.3}
(bin) 28 % ccs::config_chain testcore

(bin) 29 % jtag::lock
(bin) 30 % jtag::reset_tap 1
(bin) 31 % jtag::reset_tap 1
(bin) 31 % jtag::state_move test_logic_reset
(bin) 32 % jtag::scan_in dr 256

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

So it looks like CMSISDAP not always works properly from the outset.

Regards,

Andrey.

0 Kudos

1,988 Views
addiyi
NXP Employee
NXP Employee

Jtag low level instruction are not available, because cmsisdap library provided by ARM doesn't support this.

Adrian

0 Kudos

1,987 Views
andrey_knnv
Contributor III

Thanks for info, Adrian.

Andrey.

0 Kudos

1,988 Views
andrey_knnv
Contributor III

JLink + openOCD can see three devices in jtag chain on ls1021atwr board:

1. IDCODE: 0xA21C64CD

2. IDCODE: 0x5BA00477

3. IDCODE: 0x06B0001D

JLink + openOCD can see only two devices in jtag chain on custom board:

1. IDCODE: 0x5BA00477

2. IDCODE: 0x16B0001D

Can somebody tell me which device IDCODE: 0xA21C64CD has?

What can be the reason for disappearing device IDCODE: 0xA21C64CD on custom board?

Thank you in advance.

Andrey.

0 Kudos

1,988 Views
sinanakman
Senior Contributor III

Hi Andrey

Can you verify that LS1021a chips you are using on both boards have the same revision. It is

possible that in your custom board you are using  LS1021a rev2. 

Hope this helps

Regards

Sinan Akman

0 Kudos

1,988 Views
andrey_knnv
Contributor III

Hi Sinan,

It looks like you are right.

We have on ls1021atwr board:

CPU:   Freescale LayerScape LS1021E, Version: 1.0, (0x87081110)

On custom board installed LS1020AXE7KQB processor.

Can you confirm if JLink sees only two devices in jtag chain on custom board is correct or not?

Thanks,

Andrey.

0 Kudos

1,988 Views
sinanakman
Senior Contributor III

Hi Andrey

I use BDI3000 rather than JLink but NXP lists LS1020AXE7KQB  as Rev2.0 and in this case having only two devices (SAP and DAP) on the chain should be correct.

Hope this helps

Regards

Sinan Akman

1,988 Views
andrey_knnv
Contributor III

Hi Sinan,

Thank you for confirm.

SAP and DAP on the jtag chain visible by BDI3000 as IDCODE: 0x5BA00477 and IDCODE: 0x16B0001D right or not?

Regards,

Andrey.

0 Kudos

1,988 Views
addiyi
NXP Employee
NXP Employee

Here is what ccs via cwtap is seeing on the chain for Rev2 SoC

TDO -----
|
* Device 0 IDCODE: 5BA00477 Device: ARM DAP rev 5.x
* Device 1 IDCODE: 16B0001D Device: NXP LS1021A rev 2.x
|
TDI -----

Adrian

1,988 Views
andrey_knnv
Contributor III

Hi Adrian,

Thanks for info.

It's clear that JLink sees correct chain on our custom board.

Now I'm in doubt:

from the one side: JLink can see jtag chain on our custom board properly,

from the other side: CMSIS-DAP can't properly configure the same jitag chain on the same board.

The difference only SDA_SWD_EN_18 signal.

But it's correct. It's "HIGH" for JLink access and "LOW" for CMSIS-DAP access.

Do you have any idea what's may be wrong else?

I believe Power-On-Reset is not a reason. Is not it?

Regards,

Andrey.

0 Kudos

1,988 Views
addiyi
NXP Employee
NXP Employee

I'm not familiar with JLink, but from what I know based on ccs experience, the jtag config is different when using cmsisdap, than jtag.

jtag: ccs::config_chain {ls1020a dap}

cmsisdap: ccs::config_chain {ls1020a cmsisdap}

Maybe the above example can help you.

Adrian

0 Kudos

1,988 Views
andrey_knnv
Contributor III

Adrian,

Thanks for helping.

I'll try to play with cmsisdap a bit more.

BTW Can you tell me if CMSISDAP Firmware version: 0201 is convenient for ls1020 Rev2 SoC or not?

Now it's clear that our ls1021atwr and custom board have different processors revision.

Thank you,

Andrey.

0 Kudos

1,988 Views
addiyi
NXP Employee
NXP Employee

You can check the SoC revision by reading SVR register.

CMSISDAP firmware is not residence on LS1021A SoC, but on K22 mcu. Not sure which is the latest version.

Adrian

0 Kudos

1,988 Views
sinanakman
Senior Contributor III

Hi Andrey

I don't have access to a Rev2 board at the moment but 0x5ba00477 and 0x06b0001d seem to be right for for DAP and SAP, respectively.

Regards

Sinan Akman 

1,988 Views
andrey_knnv
Contributor III

Hi Sinan,

It looks like JLink sees correct jtag chain on our custom board.

Thanks for helping.

Regards,

Andrey.

0 Kudos

1,988 Views
addiyi
NXP Employee
NXP Employee

On your custom board, RCW is available in flash?

Adrian

0 Kudos