Problem with connect to MRB-KW019032EU by J-Link.

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

Problem with connect to MRB-KW019032EU by J-Link.

1,379 Views
alexandrsmirnov
Contributor II

Hello, I’m having a problem with connect to MKW01Z128 on MRB-KW019032EU board. I took the J-Link, connect it to J5 on MRB (VTref to 1, GND to 3, SWDIO to 2, SWCLK to 4, RESET to 10). 

mrb_jlink_na_soplyax.jpg

Connection from J-Link Commander is successful:

Please specify device / core. <Default>: MKW01Z128XXX4
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
TIF>S
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "MKW01Z128XXX4" selected.


Found SWD-DP with ID 0x0BC11477
Found SWD-DP with ID 0x0BC11477
AP-IDR: 0x04770031, Type: AHB-AP
AHB-AP ROM: 0xF0002000 (Base addr. of first ROM table)
Found Cortex-M0 r0p0, Little endian.
FPUnit: 2 code (BP) slots and 0 literal slots
CoreSight components:
ROMTbl 0 @ F0002000
ROMTbl 0 [0]: FFFFE000, CID: B105900D, PID: 000BB932 MTB-M0+
ROMTbl 0 [1]: FFFFF000, CID: B105900D, PID: 0008E000 MTBDWT
ROMTbl 0 [2]: F00FD000, CID: B105100D, PID: 000BB4C0 ROM Table
ROMTbl 1 @ E00FF000
ROMTbl 1 [0]: FFF0F000, CID: B105E00D, PID: 000BB008 SCS
ROMTbl 1 [1]: FFF02000, CID: B105E00D, PID: 000BB00A DWT
ROMTbl 1 [2]: FFF03000, CID: B105E00D, PID: 000BB00B FPB
Cortex-M0 identified.

But when I try to perform any operation with board (i.e. erase flash, download) from within IAR, I'm getting the following fault: "Failed to read CPUID for Cortex device. "

I get a similar error when trying to work with a board using the J-Flash utility: connect is succesfull:

Connecting ...
- Connecting via USB to J-Link device 0
- Target interface speed: 4000 kHz (Fixed)
- VTarget = 3.047V
- Initializing CPU core (Init sequence) ...
- Initialized successfully
- Target interface speed: 4000 kHz (Fixed)
- J-Link found 1 JTAG device. Core ID: 0x0BC11477 (None)
- Connected successfully

but when I try to erase chip, I'm getting fault:

Erasing chip ...
- 128 sectors, 1 range, 0x0 - 0x1FFFF
- Start of preparing flash programming
- ERROR: Failed to download RAMCode.
- ERROR: Failed to prepare for programming.
Failed to download RAMCode!
- End of preparing flash programming
- ERROR: Failed to erase chip

Tags (1)
4 Replies

1,103 Views
gerardo_rodriguez
NXP Employee
NXP Employee

Hello Alexandr Smirnov,

Here are some suggestions/questions that you can try:

  • Make sure that in your IAR project the correct device is selected "MKW01Z128xxx4".
  • Update your J-Link software and make sure that IAR is using the latest "JLinkARM.dll"
  • Have you tried issuing the "erase" command from the J-Link commander after connecting to the MKW01Z128xxx4? Please share the log if there are errors.

Let me know your findings.

Regards,

0 Kudos
Reply

1,103 Views
alexandrsmirnov
Contributor II

Hi, Gerardo!

  • Yes, in IAR "Project -> Options -> General -> Device "Freescale MKW01Z128xxx4" is selected.
  • J-Link firmware updated: "Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46". I tried to work with DLL versions V6.12j and  V6.20h (latest now). 
  • tried "erase" from J-Link commander after connecting, result below:

J-Link>erase
Erasing device (MKW01Z128xxx4)...

****** Error: Failed to download RAMCode.
Failed to prepare for programming.
Failed to download RAMCode!
ERROR: Erase returned with error code -1.

0 Kudos
Reply

1,103 Views
gerardo_rodriguez
NXP Employee
NXP Employee

Hello Alexandr,

Is this issue only present on this board? Do you have another MRB-KW01 board to verify this? I would recommend using a J-Link 9-Pin Cortex-M Adapter to ensure that the connections aren't loose. 

Can you try the "unlock kinetis" command to make sure that the chip is unsecured before trying to erase the chip? The unlock kinetis command will trigger a mass erase and clear the security bits in the KW01. 

Also, it would be helpful to test this in another computer too see if the behavior is the same.

Let me know your findings.

Regards,

0 Kudos
Reply

1,103 Views
alexandrsmirnov
Contributor II

Thank you for support. The problem was in the faulty J-Link. 

I managed to flash an example from KSDK when I used another J-Link. :smileyhappy: