AnsweredAssumed Answered

in-circuit flash reprogramming, executing from ram

Question asked by David Gabbay on Oct 10, 2019
Latest reply on Oct 14, 2019 by Jorge Antonio Alcala Vazquez

Is there a code example of S32K1xx in-circuit flash reprogramming. What I mean is a code embedded in an application. When it is called externally (interrupt)  it copied itself (and all associated sub functions) into RAM and run from there to accept (serially, via uart), a new version and program it into the flash.

I have done almost everything:

  1. copied the code to the RAM
  2. verified all called functions are within the copied code
  3. disabled all interrupts
  4. jump to the right location in the ram

 

However, I'm experiencing  exception once it starts running from ram.
I would expect it if the M0+ core would have an MMU, but it doesn't. Should I define ram as an executable space somewhere?

Outcomes