AnsweredAssumed Answered

Flashing S32K144 devices over SWD

Question asked by Nirav Khatri on Apr 18, 2019
Latest reply on Aug 21, 2019 by zhang hm



I am developing a design where one S32K144 chip is interfaced. The design has another main processor interfaced.

I have configured two gpios of this primary processor as SWD_CLK and SWD_IO, and currently trying to program the S32K144 board using SWD interface.


I got initial success in interfacing S32K144 chip over SWD via gpio-bit-banging. I am able to access the MDM-AP port and its functionalities such as

- Read MDM-AP ID register

- Mass erase the chip

- Put the core into halt state.


Now I want to flash a hex file into the board by SWD interface.


For S32K devices, are there any in-detail steps or similar reference to perform flashing .hex file using AHB-AP over SWD?

I am looking for steps which fulfill:-

- Flash a .hex file in program flash (in the similar way flash in jflashlite using JLink).

- Verify(by Read Back or similar mechanism) that .hex file is flashed correctly.

- Eliminate chances of enabling the "flash protection" while performing above two procedure.


I referred "Document Number: AN12130" and reference documents under its "further reading" section. But it seems incomplete for providing the detailed steps for flashing algorithm of S32K devices.


Thanks in advance!