Unable to program the K64 Custom board

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

Unable to program the K64 Custom board

1,223 Views
kapil_p
Contributor III

Hello,

I am trying to program my custom board with a chip MK64FN1M0xxx12  

To program the board I am using the Segger J-link M cortex. When I connect Segger to my board there is a red led (I think meaning of this Red led is the controller is in reset mode).

I followed all the solutions given in the community like 

10K pullup at NMI pin

10K at SWDIO/TMS

I followed the 

How To Sucessfully Program a Custom made Kinetis Microcontroller Board. 

According the above link , when I put a probe on reset pin same waveform is getting like thispastedImage_10.png

To mass erase my chip I tried GUI FLASH TOOL , but the error is generated 

Executing flash operation 'Erase' (Erase flash) - Fri Oct 04 13:02:35 IST 2019
Checking MCU info...
Scanning for targets...
Executing flash action...
SEGGER J-Link Commander V6.44i (Compiled May 17 2019 17:35:18)
DLL version V6.44i, compiled May 17 2019 17:34:22
J-Link Command File read successfully.
Processing script file...
J-Link Commander will now exit on Error
J-Link connection not established yet but required for command.
Connecting to J-Link via USB...O.K.
Firmware: J-Link Lite-Cortex-M V8 compiled Sep 15 2016 12:05:01
Hardware version: V8.00
S/N: 528001049
License(s): GDB
VTref=3.300V
Target connection not established yet but required for command.
Device "MK64FN1M0XXX12" selected.
Connecting to target via SWD
InitTarget()
Connect Under Reset
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x001C0000)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
ROMTbl[0][6]: E0042000, CID: B105900D, PID: 003BB907 ETB
ROMTbl[0][7]: E0043000, CID: B105900D, PID: 001BB908 CSTF
Cortex-M4 identified.
Erasing device...
****** Error: Verification of RAMCode failed @ address 0x1FFF0000.
Write: 0xA801BE00 F0009900
0x23000042 A801BE00
Failed to prepare for programming.
Failed to download RAMCode!
ERROR: Erase returned with error code -1.
Script processing completed.
Unable to perform operation!
Command failed with exit code 1

I tried to program both by using SWD and JTAG.

Please help me to solve this essue.

0 Kudos
2 Replies

1,052 Views
Alexis_A
NXP TechSupport
NXP TechSupport

Dear Kapil,

I see that you're using the command line and a script to flash the MCU. Could you try using the command 'unlock kinetis' before programming the MCU?

Best Regards,

Alexis Andalon

0 Kudos

1,052 Views
kapil_p
Contributor III

Hello Alexis

   Thank you for yours reply.

            I successfully downloaded the code , I unlocked and erased the chip using J-link commander.

Thank you

Kapil Patil

0 Kudos