AnsweredAssumed Answered

Can't program or erase flash of S32K148 using ULINKpro and Keil IDE

Question asked by Tomas Frcek on Nov 8, 2017
Latest reply on Nov 10, 2017 by Robert Boys

Hello,

I have a S32K148EVB-Q144 board with which I have been toying for some time. I'm using Keil IDE and ULINKpro to develop and download/debug software. Up until now, everything was working fine.

 

But today I tried to configure the CLKOUT pin to mirror the clock signal from PLL. After that, I could no longer download or erase the program flash in Keil IDE using ULINKpro programmer. I tried every available SW clock, but no luck.

 

I remember a similar problem with a LPC1769 MCU, where the chip entered an unstable state right after reset and I could no longer reprogram it nor erase it either. I was able to solve this by erasing the entire flash using the FlashMagic software. However, FlashMagic does not support the S32K148.

 

I looked into the manual and found the following:

 

In addition, the entire flash memory can be erased from the external SWJ-DP debug port
according to this sequence:
1. Set MDM-AP Control[0].
2. MDM-AP Status[0] sets to indicate the mass erase command has been accepted.
3. MDM-AP Status[0] clears when the mass erase completes.

 

But I have no idea how to perform these steps.

 

Please, help me solve this issue!

Thanks!

Outcomes