Hi all. I'm having some trouble programming a K64F microcontroller. I have two FRDM-K64F development boards and I'm using one to program the other. This works fine. When I try to program another MK64FN1M0VLL12 on a custom PCB it fails. The following is the console output in KDS v3.0.0:
Connecting to J-Link...
J-Link is connected.
Firmware: J-Link OpenSDA 2 compiled Feb 14 2017 15:54:11
Checking target voltage...
Target voltage: 3.30 V
Listening on TCP/IP port 2331
Connecting to target...ERROR: Kinetis (connect): Timeout while unsecuring device. Erase never starts.
Kinetis (connect): Failed to unsecure Kinetis device.
ERROR: Error while identifying Cortex-M core.
ERROR: Could not connect to target.
Target connection failed. GDBServer will be closed...Restoring target state and closing J-Link connection...
My board is very simple indeed. I copied the SWD traces directly from the FRDM-K64F schematics. I've tried two of my own boards, with MCU's sourced from different suppliers (DigiKey and Farnell), and get the same result. Is the MCU actually secured as the console output suggests? If so this is rather frustrating as they have been shipped in this state. I've tried unlocking using the Segger J-Flash utility but no luck. It seems the device cannot be erased.
I've attached the schematic for the board.
Not sure what to do, any help would be appreciated.