AnsweredAssumed Answered

K64F MCU on custom board not replying with genuine Segger J-Link using SWD.

Question asked by hak8or on Aug 28, 2015
Latest reply on Aug 31, 2015 by hak8or

I made my own custom board using the MK64FN1M0VLL (same as on the Freedom K64F Mbed board) but I am having issues with flashing it (K64F not seeming to reply to any SWD commands). I have a feeling this is happening because the micro controller is not being correctly put and kept in a reset state when it should during SWD communications. To be clear, this is an un-programmed K64F fresh from the factory.


Below is the reset line when power is applied to the K64F. The line going high seems to make sense based on the MCU resetting itself due to as I understand this post here.



And here is me running an "unlock Kinetis" command in J-Link commander. Shouldn't reset be held low during this time?

There is a 50 uS gap between every 1.5 uS long spike at 3.3v.

Unlock Kinetis Command.bmp


Power is from USB 5V -> ferrite bead -> 10 uF capacitor -> 0.1 uF decoupling capacitor -> K64F 5v to 3.3v regulator -> 2.2 uF 3.3v output -> all VCC pins with their own 0.1 uF decoupling caps

I am using the internal regulator on the K64F to convert the USB 5 volts to 3.3 volts which is being used to power the K64F.


  • USB 5 volts has 10 uF decoupling cap after ferrite bead.
  • VREGIN connected to USB 5 volts and has 0.1 uF decoupling cap.
  • VOUT33 (Pin 12) has 2.2 uF decoupling cap.


  • EZP_CS/NMI (PTA_4, Pin 38) pulled up with a 4.7k resistor.
  • SWD_CLK (PTA0, Pin 34) pulled up with a 100k resistor (as per ARM recommendations).
  • SWD_DIO (PTA3, Pin 37) pulled up with a 100 k resistor (as per ARM recommendations).
  • Reset (Pin 52) pulled up with a 4.7k resistor (no 0.1 uF cap).


  • All VDD/VSS pairs have 0.1 uF decoupling caps.


  • VDDA + VREFH connected to 3.3v and VSSA + VREFL connected to ground, share a single 0.1uF decoupling cap.


I connected Reset, SWD_DIO, SWD_CLK, Ground, and 3.3v (VTref, J-link uses this to sense the target voltage) to the Segger J-Link adapter.

Any suggestions on what the reset line should be doing during SWD communication? If I pull it low myself by removing the 4.7k pullup and adding a 4.7k pulldown, should the programming process still work? Are the Kinetis devices locked when fresh out of the factory?

Or, even better, does Freescale have bare minimum example for a K64F MCU to be able to be programmed fresh out of a factory using SWD?


Thank you for any potential help,