If you want to use another MCU to program KL25, I think you have to use GPIO to simulate SWD protocol. For protocol, you can find from ARM site. Resourcing is opened.
Hope my reply can help you.
I was planning to use GPIO as you suggested and have downloaded the ARM Debug Interface specification. Is all of the information needed to write the Kinetis flash memory included in this document, or are there Kenetis specific commands or debug memory interfaces that I need to know about?
i also have similar requirement to program the flash memory through SWD. I found a document from Freescale AN4835 which talking about how to connect to the SWD. But after I connect, how to do the erase, program section, read operations? How to send all those flash commands through SWD?
Thank you in advance.
The SWD protocol is more easily simulated with the SPI interface on the Kinetis devices, in particular the K20 devices are convenient because they allow variable-length transactions. You can refer to the source for USBDM firmware for example code.
The programming of the Flash is described in the Device Manual and has nothing to do with the SWD protocol. You should also consider using the EZPORT protocol which does not require target code execution. This is also described in the Device manual.
Message was edited by: Peter O Donoghue
As has been pointed out by Paul - The KL series devices don't have EZPORT.