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).
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
Hello Alexandr Smirnov,
Here are some suggestions/questions that you can try:
Let me know your findings.
Regards,
Hi, Gerardo!
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.
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,
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: