I am currently trying to program the S32K118 board using the SWD interface.
I am able to access the MDM-AP & AHP-AP port .
The mass erase command can be executed correctly through the MDM-AP port.
But now I have some problems......
After I use the mass-erase command by MDM-AP, I can't read the value of any register anymore.
I tried to write 0xC0000000 on the PCC FTFC Register (PCC_FTFC), but it didn't work.
There is still a question I hope to ask.
how to do this?
I don’t understand very well.Have a more detailed explanation?
Thanks in advance!
There are detailed steps in the application note that you mentioned.
Once the MCU is mass erased, you can read the MDM-AP Status bit to see if the MCU is unsecured.
You need to set the debug request bit (MDM-AP Control) before releasing the reset.
As you said，I have been set the debug request bit,But the problem does not seem to be here.I still can't read the value of some registers(eg 0x40065080).
Is there any other reason that will cause this to happen?
It is hard to say what could be wrong.
When the MCU is in Debug mode, you should be able to read the registers.
I don’t think that this is an issue of the MCU but rather there is something wrong in your SWD implementation.
Could you use an existing programmer and capture the SWD communication for your reference?