Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

Please accept the use of cookies on our site

At PEmicro we use web browser cookies in order to provide you with an enhanced experience and in order to be able to do things like shopping cart processing and identify you when you login to our website.

Click here to accept

search inside this forum
search inside all forums
I Disable SWD Port and I cannot Erase and/or Debug Kinetis SKEAZ128XXX4
sdffgsdffg7 s. Jul 6, 2015 at 12:09 AM (00:09 hours)
Staff: Juan S.

  • I cannot Erase and/or Debug Kinetis SKEAZ128XXX4 because I Disable SWD Port Pin by clearing SWDE bit in SIM_SOPT0 register in first line of my program and. How to Erase my program in SKEAZ128XXX4?


  • what software and software version are you using?

  • Hello, Juan

    Thank you for reply
    I use CW10.6 + MULTILINK UNIVERSAL + KEA128BLDCRD: 3-phase Sensorless BLDC Motor Control Reference Design Based on Kinetis KEA128 MCUs.

    My problem is command SIM_SOPT0 = 0; in first line of my program
    This command clear SWDE and RSTPE bits. In the result SWD and RESET pin operate only during short time after controller start.
    Of cause I need to erase EEPROM of my MCU

    My problem was solved after using from this website, but it also was not so easy.

    1. to stop controller we have to use special sequence of actions
    - Start Kinetis_Recovery_Utility.exe and activate
    - turn off board power with pressed button RESET
    - turn on board power and release button RESET -> in this moment MCU is stop!!! and I have to erase my program in EEPROM but unfortunately I not found button "Erase EEPROM" in Kinetis_Recovery_Utility (!!!make it please!!!)

    2. Ok! MCU is stopped - how to erase EEPROM??? I try to use CW10.6 but I was fail many times (CW10.6 so inconvenient and complicate IDE with many not understandable error messages). Many times try to Erase of download new program but I was fail.

    3. So I install Keil and easy found "Flash->Erase" and erase EEPROM successfully (Keil and IAR really fast and simple to use IDE)

    1. for stop MCU use Kinetis_Recovery_Utility + MULTILINK UNIVERSAL
    2. for erase EEPROM use Keil + MULTILINK UNIVERSAL
    3. good idea to add reset pin control to Kinetis_Recovery_Utility for simple stop MCU (without any RESET button action - not all boards include this button)
    4. good idea to add button "ERASE" to Kinetis_Recovery_Utility for simple erase program with problem such SWD disable code. When controller is lock usually one main idea to erase it as soon as possible to continue debugging code.


  • Dear users,

    If anyone else has bricked their Kinetis FRDM boards and need a way to recover them, please try our Kinetis Recovery Utility.

    Here is a very thorough guide on how to perform the recovery process from an engineer at Freescale.

    P&E Engineering Support

Add comment

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

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