This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123GH6PM: Unlock TM4C123GH6PM MCU

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: SEGGER, UNIFLASH, EK-TM4C1294XL, LM3S1608

Hello. I have a custom board with TM4C123GH6PM mcu. SWD interface are routed on board. Unfortunatly I flash firmware that congured SWDIO and SDCLK as gpio(reserve this pin in PinMux as gpio). After this I can't conncect to mcu. I use segger j-link as debugger. Then i try to connect to mcu using segger console a got next report:

Connecting to target via SWD
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Could not read AHB ROM register

****** Error: DAP error while reading DP-Ctrl-Stat register.
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
Iterating through AP map to find AHB-AP to use
AP[0]: Skipped. Could not read AHB ROM register
Cannot connect to target.

I try to execute mass erase sequense but it doens't help. What else can I do?

  • Hi,

    You have locked out the device from debug when you configure the JTAG/SW interface for GPIO. You need to to an unlock to factory setting. Which tool did you try to do mass erase? Have you tried the LM Flash Programmer? See below image. Also follow the detailed instructions in 5.3.1 in this app note. 

  • No, i didn't. But seems like it doen't support segger. I have only this debugger. I use j-link commander to do mass erase using next command
    J-Link>r0
    power up board
    J-Link>unlock LM3Sxxx
    power down
    power up
    But it doesn't help
  • Correct. The LM flash programmer does not support J-Link. It only supports ICDI debug probe. You show "J-Link>unlock LM3Sxxx". Why is it LM3Sxxx? Don't you have a selection for TM4C123? You might want to contact Segger or whatever IDE you are using along with the J-Link to see what options they have to mass erase the TM4C123.

    In the app note I attached, go to section 4.6 if you have a TM4C123 LaunchPad. You can use the TM4C123 LaunchPad to debug your custom board and hopefully you can try the LM flash programmer to unlock your custom board. However, there is no guarantee though since you have already tried with the J-link unlock and didn't succeed. Give it a try with LM flash program by using the TM4C123 launchpad to debug your custom board. If you still cannot unlock then my best suggestion is to move on with a new board or if you have time to swap a new chip into your custom board.

    One more option for you is that if you have other debug probes such as XDS100, XDS110 or XDS200 then you can use the Uniflash to try unlocking the device. The Uniflash can be found in http://www.ti.com/tool/UNIFLASH.

  • I check mass erase sequnse for LM3S1608 and it's equvalent for my mcu. I have ek-tm4c1294xl board. Will try to use it for this issue. XDS100 doesn't help because a have only swd pins(excluding wire soldering).
  • Hi,
    Have you tried with the launchpad board as a debug probe to your custom board?
  • Hi,
    I want to make some update to my last reply. The ICDI in the launchpad doens't support SWD. Only JTAG is supported. You can try with XDS110 or XDS200 which support SWD. If you have neither of those debug probes then I will suggest you contact Segger for support on unlocking the device. I can't support Segger J-Link as I'm not an expert in this 3rd party tool's full features, capabilities and its support for device mass erase.