Jump to content

TM4C1294XL LaunchPad is blocked from WDT

Recommended Posts

I have a problem with Tiva C Series EK-TM4C1294XL LanchPad.

.Totally is blocked: (


Only the green LED1 illuminates with low-intensity! 

I wanted to incorporate a greater value for WDT timer but I made a mistake and enter lower.

I wanted to reset every 10 seconds.

And I enter WatchdogReloadSet (WATCHDOG0_BASE, SysCtlClockGet () / 10000).

Instead of WatchdogReloadSet (WATCHDOG0_BASE, SysCtlClockGet () * 10000).

Now microcontroller is continuously in reset and can not be programmed with ICDI.

Following message appears: Unable to find any ICDI devices.

How to solve this problem?


Code is from the link with small changes.


#include <stdint.h>
#include "inc/hw_types.h"
#include "inc/hw_ints.h"
#include "driverlib/sysctl.h"
#include "driverlib/eeprom.h"
#include "driverlib/watchdog.h"
#include "driverlib/interrupt.h"

#define LED1 PN_1
int interval = 50;
void setup()
pinMode(LED1, OUTPUT); //LED 1

void loop()
//Watchdog Stuff

if(WatchdogLockState(WATCHDOG0_BASE) == true)
//WatchdogReloadSet(WATCHDOG0_BASE, ROM_SysCtlClockGet());
WatchdogReloadSet(WATCHDOG0_BASE, SysCtlClockGet()/10000); // This is a mistake

//do stuff
digitalWrite(LED1, HIGH); // turn the LED on (HIGH is the voltage level)
delay(interval); // wait for a second
digitalWrite(LED1, LOW); // turn the LED off by making the voltage LOW
delay(interval); // wait for a second


Link to post
Share on other sites
I managed to get back to normal with the latest LM Flash Programmer :) 
The procedure is as follows:
 - Select the appropriate lanchpad
 - Go to other utilities
 - disconnect the USB,
 - click unlock,
 - confirm with yes
 - on next MsgBox hold reset, connect
 - click ok, while still holding reset
 - release reset
 - power cycle board (and restart Flash tool?)
 - after that the programming works :)


Link to post
Share on other sites

Do be aware that SysCtlClockGet does not work on the 129x processors - it is only for 123x processors.  I got bit by this one also.

Would have been nice if Tivaware would issue warnings for library calls that do not work with the processor you tell it you are using.

Instead of giving an error it returns some bogus value.  There are a few other calls and constants like that.

Link to post
Share on other sites

If you look at the TivaWare source, there are several cases where, unless CLASS_IS_TM4C123 and CLASS_IS_TM4C129 are defined externally to compile-time constants, the code determines whether it's running on a TM4C123 or TM4C129 at runtime by reading SYSCTL->DID0. It works, but it's an interesting design choice since the information was required to be known at compile-time use of SysCtlClockGet on a TM4C129 could have produced a compile-time error rather than a runtime brick-the-device behavior.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...