[SOLVED] JLink Ultra+ flashing problems with S32K144W

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] JLink Ultra+ flashing problems with S32K144W

    Hello,

    I am currently trying to work with the S32K144W in a project but I am having difficulties using the JLink Ultra+ to flash the device. The JLink is able to connect to the target but fails at this step:
    • Failed to prepare for programming.
    • Could not preserve target memory
    I have attached the console readout of the flash attempt with Ozone.

    I was able to flash it with NXP S32DS but using Ozone or any other SEGGER software I am unable to erase flash or program it. I assume the S32DS is doing some different steps but I wasn't able to pinpoint what was the difference. The jlink commands seems to be very similar.

    I am also at a point where I'd like to partition my device for flash storage and bootloader but I am concerned about locking the device if I can't mass erase and end up protecting the flash.


    *****EDIT*****
    I updated my Ozone version to the latest and obtain the following error:
    Failed to preserve target RAM @ 0x1FFF8000-0x20006FFF.
    Failed to prepare for programming.
    *****EDIT*****

    *****EDIT 2****
    I was able to connect via JFlash and erase the whole flash. I was then able to flash with Ozone and also VSCode. I am not sure what happened when erasing the whole flash. I guess there is a flash registers that protect it somewhow. If anyone has any insights on this I would appreciate to understand better the change in behavior.
    *****EDIT 2****

    Thank you for your help!
    Files

    The post was edited 2 times, last by louispelletier ().

  • Hi,
    Even though the thread is quite old, an answer to the question can be found here:
    wiki.segger.com/S32Kxxx#Readout_protection_of_internal_flash

    BR
    Fabian
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.