I have a SOC system that has SWD interface to my S32K144. I am not the one coding but I have more of a general questions as I am told that it is not doable but I have my doubts.
We have firmware programming function for the chip from SOC to the S32K144.
I'd like to be able to store a firmware version number as part of tracking of the programming sequence. Something simple that will represent something like a version "5.1" or something similar.
Is that doable via SWD interface and if so any generic pointers on where to look for information that I could relay to the main parties involved in our project?
Let me rephrase this another way to maybe simplify my questions:
If my firmware itself writes its own version somewhere in memory, can this location be read via SWD interface?
you are able to read any memory-mapped resources using SWD, so the answer is yes.
There's also option to store such data to Program Once field if you don't want to allow others to modify it. This field consists of 64 bytes. It can be programmed using Program Once command and then it can be read by Read Once command. It's not memory mapped, so the only way is to use these commands in flash module. The commands can be simply executed by writing the commands to flash registers. The flash registers are memory mapped, so you can also access them via SWD interface.