Flashing S32K118 devices over SWD

cancel
Showing results for 
Search instead for 
Did you mean: 

Flashing S32K118 devices over SWD

216 Views
Contributor I

I am currently trying to program the S32K118 board using the SWD interface.

I refer to the AN12130 documentation, and this blog.

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.

pastedImage_4.png

how to do this?

I don’t understand very well.Have a more detailed explanation?

Thanks in advance!

0 Kudos
3 Replies

11 Views
NXP TechSupport
NXP TechSupport

Hi zhanghongmin180@126.com

There are detailed steps in the application note that you mentioned.

Once the MCU is mass erased, you can read the MDM-AP Status[2] bit to see if the MCU is unsecured.

You need to set the debug request bit (MDM-AP Control[2]) before releasing the reset.

pastedImage_2.png

BR, Daniel

0 Kudos

11 Views
Contributor I

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?

thanks

0 Kudos

11 Views
NXP TechSupport
NXP TechSupport

Hi zhanghongmin180@126.com

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?

DAPLink: https://github.com/ARMmbed/DAPLink

Regards,
Daniel

0 Kudos