I have been dealing with this issue for a very long time, and since I was unable to resolve it I decided to actually ask someone else.
The custom kl05z board (for the mkl05 microcontroller) refuses to be programmed by using the header in the original kl05z board.
RESET, SWDIO, SWDCLK, VCC, GND have been connected to the respective pins on kl05z. The CLK signal is disconnected from the on-board microcontroller. There is 1 uF capacitor on the power, no additional pull-ups or capacitors on all other pins since they are already on the original board.
After an attempt to load program there is a window saying: "Kinetis device is locked! Do you want to unlock it ? Mass Erase will be executed!"
I click yes, then there are windows popping saying:
1. AGDI - Cortex-M Error "Cannot access memory"
2. Error: Flash Download failed - Target DLL has been cancelled
Unfortunately, this has been happening over and over again with no clear reason why is that happening. Electrically the signals are quite alike, see the attachments: the original signal is same with the difference in not having those weird "peaks". Is there any answer why is that happening?
Original Attachment has been moved to: headlamp.brd.zip
Original Attachment has been moved to: headlamp.sch.zip