about jtag down load fail and uart print.

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

about jtag down load fail and uart print.

2,535 Views
284286985
Contributor II

dear NXP,

    suddenly, I met "cannot reset target Shuting down debug session", before it's ok, would you give me some clue?

   another question, how can I print to screen through uart? 

    tool I use is mdk keil. thanks 

  br

  rike

Labels (1)
0 Kudos
15 Replies

2,235 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

You have MDK IDE error message, From this doc, there is bug on v5.22 but it has been fixed in v5.23 and newer version.

µVISION DEBUGGER: "Cannot Access Target" Message Using NXP CMSIS-DAP 

For more information about this error message, please contact Keil directly. 

Regarding to your other question "how can I print to screen through uart"

You can refer MCUXpresso SDK demo code:

Welcome | MCUXpresso SDK Builder 

MAKE SURE YOU DONWLOAD THE SDK FOR MDK KEIL.

inside the SDK package, check example hello_world demo. It outputs the hello world demo in the uart terminal window

- 115200 baud rate


Have a great day,
Jun Zhang

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

2,235 Views
284286985
Contributor II

hi Jun,

thanks,

firstly it's ok to download and debug in MDK keil,

after a few days, it report Cannot Access Target" Message Using NXP CMSIS-DAP , so i don't think it's because of keil., is there other way to get around this issue?

thanks ~~

br

Rike

0 Kudos

2,235 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Rike,

Is this the same problem as the original issue?

the connection worked well previously but can't connect from one day?

Normally if meet this issue, we test the board with another computer or IDE ( MCUxpresso or IAR) to identify the problem is on board or PC IDE system.

Have a nice day,

Jun Zhang

0 Kudos

2,235 Views
284286985
Contributor II

sorry I can't use IDE.

yes, can't down load to interna flash from some day.

but jtag chain is ok to link to 55s69, when down load, it report

"Load "debug\\hello_world.out"
Cannot access Memory (@ 0x00000004, Read, Acc Size: 4 Byte)

File : C:\Keil_v5\ARM\PACK\NXP\LPC55S69_DFP\12.0.0\NXP.LPC55S69_DFP.pdsc
Sequence : ResetCatchSet -> ResetCatchSetCore0
Context : Item #2: <control if="(Read32(0x40034FE0) & 0xB) == 0" info="No Error reading Flash Word with Reset Vector">
Item #0: <block>::Line 2
Expression : "v5\ARM\PACK\NXP\LPC55S69_DFP\12.0.0\NXP.LPC55S69_DFP.pdsc"
E310 : Debug access failed - cannot read address 0x00000004 (accsize '4', AP '0')


PDSC: Sequence Execution failed
PDSC: Sequence Execution failed
Error: Flash Download failed - Target DLL has been cancelled"

and give out a response" can't reset taget, shutting down debug session."

stuck here for a month, would you hep? 

btw, DS2 link2 boot led always shink at 60hz , never stop. please help

br

Rike

0 Kudos

2,235 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Rike,

Don't know how to reproduce your issue.

We really need more information to set up the testing environment:

1. SW you used and SW version

2. emulator and version

3. step by step screenshots of how to reproduce the issue.

Thanks

Jun Zhang

0 Kudos

2,235 Views
284286985
Contributor II

hi  Jennie,

    SW is MDK5.23, I can't use ide.

     emulator is V9, jlink, 

     powered through P6, using usb debug probe. 

     example I run is hello world.

    they are ok, for I have ever download to internal flash and run step by step couple of times.

    firstly, what does it mean  DS2 link2 boot led is always flicker, never stop, it's freq is 1 hz

             if so DS2 link2 ok or not?

    second  m33 jtag chain is seen from debug item of MDK, then why not can not download to internal flash?

    MDK project is initial, I don't touch any thing. 

    br

    Rike

0 Kudos

2,235 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Rike

LED DS2 is the Link2 MCU BOOT0_LED indicator. On my side, I can use MDK connect board well, LED DS2 is also 1Hz blinking . It's normal.

I use MDK v5.28 and on-board CMSIS-DAP interface connect board without issue. see attached video. 

Please use the same MDK version to test again.

I also suggest you using LPCScrypt to update the debug firmware interface, in case the on board debug firmware is corrupt.

For more about MDK setting issue, please contact Keil who produces this tool. Thanks for your understanding.


Have a great day,
Jun Zhang

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

2,235 Views
284286985
Contributor II

Hi jennie,

    thanks for response, 

    I don't think it's because of MDK version, because I could down load to 55s69 board, and see the LED frequency update.

    and I alos updated debug firmware with LPCScrypt, and the jtag chain is ok.

   is there other suggestion that MDK can't program internal flash from the begining address?

0 Kudos

2,235 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

I suggest you test the board connection with other IDE tools. for example MCUXpresso IDE (free of charge). thus you can verify the problem is on HW or IDE.

0 Kudos

2,235 Views
284286985
Contributor II

hi Jennie, thanks for your suggestion, please refer attached error report when begin download flash for debug .

please help have a check. thanks 

BR

Riketarget_disconnect for 55s69 when begin debug.jpg

0 Kudos

2,235 Views
284286985
Contributor II

MCUXpresso IDE RedlinkMulti Driver v11.0 (Aug 27 2019 16:46:33 - crt_emu_cm_redlink build 22)
Found chip XML file in C:/Users/Rike/Documents/MCUXpressoIDE_11.0.1_2563/workspace/lpcxpresso55s69_led_blinky/Debug\LPC55S69.xml
Reconnected to existing LinkServer process.
connection failed - Em(01). Cannot find MEM-AP selected by core index (check target power).. Retrying
Using memory from core 0 after searching for a good core
On debug connection - use system reset, stalling when 0x50000040 is accessed
Retask read watchpoint 1 at 0x50000040 for boot ROM stall
Waiting for target to stop...
Warning - processor did not halt - gave up waiting
debug interface type = Cortex-M33 (DAP DP ID 6BA02477) over SWD TAP 0
processor type = Cortex-M33 (CPU ID 00000D21) on DAP AP 0
number of h/w breakpoints = 8
number of flash patches = 0
number of h/w watchpoints = 4
Probe(0): Connected&Reset. DpID: 6BA02477. CpuID: 00000D21. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Content of CoreSight Debug ROM(s):
RBASE E00FE000: CID B105100D PID 0000095000 ROM (type 0x1)
ROM 1 E00FF000: CID B105100D PID 04000BB4C9 ROM (type 0x1)
ROM 2 E000E000: CID B105900D PID 04000BBD21 CSt ARM ARMv8-M type 0x0 Misc - Undefined
ROM 2 E0001000: CID B105900D PID 04000BBD21 CSt ARM DWTv2 type 0x0 Misc - Undefined
ROM 2 E0002000: CID B105900D PID 04000BBD21 CSt ARM FPBv2 type 0x0 Misc - Undefined
ROM 2 E0000000: CID B105900D PID 04000BBD21 CSt ARM ITMv2 type 0x43 Trace Source - Bus
ROM 1 E0040000: CID B105900D PID 04000BBD21 CSt type 0x11 Trace Sink - TPIU
NXP: LPC55S69
DAP stride is 1024 bytes (256 words)
Inspected v.2 On chip Flash memory using IAP lib LPC55xx.cfx
Image 'LPC55xx Aug 27 2019 15:35:49'
Opening flash driver LPC55xx.cfx
Sending VECTRESET to run flash driver
AFTER driver startup timeout (302 5ms retries)
Driver Addresses
Start: 14000000
Entry: 14000035
End: 140003B8
Stack: 30000800
Mailbox:30006800
Driver Register State
R0: 30006800
R1: 00000000
R2: 00000000
R3: 00000000
R4: 00000000
R5: 00000000
R6: 00000000
R7: 00000000
R8: 00000000
R9: 00000000
R10: 00000000
R11: 00000000
R12: 00000000
SP: 30007C00
LR: FFFFFFF9 (exception from main thread)
PC: 10000168
xPSR: 690A0003
MSP: 30007C00
PSP: 30000800
CFBP: 00000001 (CONTROL=0x0, FAULTMASK=0x0, BASEPRI=0x0, PRIMASK=0x1)
Stacked Exception information at MSP
30007C1C: xPSR: 34921192
30007C18: VECTPC: 31160130
30007C14: LR: 49738088
30007C10: R12: 71749C49
30007C0C: R3: 74561528
30007C08: R2: 074DFC38
30007C04: R1: 518E90FF
30007C00: R0: 845D0CA0
Exception registers
E000ED04: ICSR: 0440F803 (PENDSTSET, ISRPENDING, VECTPEND=15(systick), RETTOBASE, VECTACTIVE=3(hard fault))
E000ED08: VTOR: 10000000 TBLBASE=0(INCODE), TBLOFF=0x200000
E000ED28: MMFSR: 00
E000ED29: BFSR: 11 (STKERR, IBUSERR)
E000ED2A: UFSR: 0010 ()
E000ED2C: HFSR: 40000000 (FORCED)
E000ED30: DFSR: 00000001 (HALTED)
E000ED3C: AFSR: 00000000
E000ED24: SHCSR: 00000004 (HARDFAULTACT)
E000ED34: MMAR: 0103EA38
E000ED38: BFAR: 0103EA38
E000EDFC: DEMCR: 01100000 (TRCENA)
VECTPC instructions near 34921192
3492118C: (can't read - Nn(05). Wire ACK Fault in DAP access)
3492118E: (can't read)
Flash Driver V.2 startup failed - rc Ef(34): Timed-out initializing flash.
chip initialization failed - Ef(34): Timed-out initializing flash.
failed to initialize flash driver LPC55xx.cfx

0 Kudos

2,235 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

So both MCUXpresso IDE and MDK can't connect the board. the problem may be more on HW than SW.

Please check if the problem is the same on another computer? if the problem is the same, send me a photo of the board WHEN BORD CONNECTING PC. let me check board status and connection.

Jun Zhang

0 Kudos

2,235 Views
284286985
Contributor II

3.jpg1.jpg2.jpg

0 Kudos

2,235 Views
284286985
Contributor II

hi  jennie,

    I don't touch the switch since get the board,

   there is 4 switch in the board, for J6, select FS, for P4, select 3.3v, for J3, select "loc"  and J4 is connect.

    is there other reason ? 

   br

   Rike

0 Kudos

2,235 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Rike,

I checked your board, the jumpers and leds status are ok.

I suggest you update the on board debugger firmware with LPCScrypt.

LPCScrypt v2.1.0 | NXP 

!! Don't forget install DFU(J4) during the update, and remove it after.

You should be able to see below message if the DFU update successful.

pastedImage_2.png

!! make sure you have checked the board with two more computer. If you finish all above checking but still have problem, please go to the distributor whom you bought board from and check if your board is not broken.


Have a great day,
Jun Zhang

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

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos