Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
Kinetis KM34Z - Device Secure. Erase to unsecure?
Arvind M. Mar 13, 2017 at 10:27 AM (10:27 hours)
Staff: Johnny N.

  • Hi,
    We are using the MKM34Z256 device on our custom hardware board. We successfully tested basic GPIO functionality but when we tried programming the LPUART we got "Device Secure. Erase to unsecure?" error.
    Since then we are unable to program the device nor revert to the older working version of the code. We are also unable to erase the device.
    We use the P/E Micro Universal Multilink FX programmer on KDS3.2, SWD protocol.
    We lost two boards so far. Kindly help!

    Regards,
    Arvind




    Comments

    • Hi Arvind,

      We have a utility that might be able to recover Kinetis boards that are "bricked" by going into low power mode which disables Reset or the debug module.

      http://www.pemicro.com/downloads/download_file.cfm?download_id=393

      Please refer to the following blog by NXP Engineer Erich Styger who has some helpful tips on how to setup your low power mode to avoid issues with debuggers.

      https://community.nxp.com/thread/308580

      https://mcuoneclipse.com/2013/06/16/bricking-and-recovering-frdm-kl25z-boards-reset-swd-clock-and-low-power/

      Regards,
      Johnny
      P&E

      • Thank you Johnny for the response.
        I tried this recovery utility too. I managed to get the processor halted but that too did not help. I still see the error.
        Here's a list of all what I tried
        1. Reverted to old code that worked - Unsuccessful. Couldn't program a working code too.
        2. Powered from battery to see if there is noise on power lines. Did not help.
        3. Power target from MultiLink Universal FX programmer. Did not help.
        4. Kinetis Recovery Utility - Did not help.
        5. On another board - As mentioned in my original message, when I tried programming the LPUART (pins 93 and 94) I saw this error. Unable to recover since then.

        When I only programmed the GPIOs everything looked normal, I verified by flashing the program multiple times. Also tested reset push button functionality. Didn't see a problem. Only when I regenerated code through Processor Expert to configure LPUART pins and tried flashing this program (elf file) I got this problem.

        If you have any other suggestions kindly let me know.

        • Hi Arvind,

          I need you to clarify a few things.

          1. Which chip low power mode have you configured?

          2. Do you have the RESET pin disconnected or configured as a GPIO?

          3. What do you mean by "when I tried programming the LPUART"? Are you using the LPUART pins (Tx and Rx) to program the Kinetis chip?

          -Johnny
          P&E

  • Hello Johnny,

    1. I've intentionally not configured any Low power mode. This is the first time that we programmed the devices. We started with a basic GPIO code to toggle few LEDs.

    2. The RESET pin is a dedicated reset pin, connected to SWD connector and a push button switch. We do not use this for any other purpose.

    3. I mean't after successfully testing the initial GPIO toggle code, we moved forward and wanted to try bringing up another interface. We initialized port PTI (pins 93 and 94) as LPUART pins and generated Process Expert code (within KDS3.2). While we were in the process of programming the device, to be exact when the debugger was being initialized by the tool we see this error.

    Hope this gives a better idea of the problem.

    Regards,
    Arvind

    • Arvind,

      What you did should be fine. Did you initialize Port E? It looks like that is multiplexed with some SWD pins. If you accidentally disabled the debug function of these pins, you could see similar errors.

      Can you send us your full KDS project? Hopefully, having the project will give our engineers a better idea of what is causing this since we will try to replicate it on our board. If we can replicate the issue, we will try our best to find a way to recover the board.

      Regards,
      Johnny
      P&E

      • Hello Johnny,
        Kindly share an email id to which I can send the KDS code download details. The entire code is around 20MB.

        Regards,
        Arvind

        • Please zip up the project and email it to johnny [at] pemicro.com

Add comment


   Want to comment? Please login or create a new PEMicro account.







© 2017 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement