Jump to content
developer_bt

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
SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0);
SysCtlPeripheralReset(SYSCTL_PERIPH_WDOG0);

if(WatchdogLockState(WATCHDOG0_BASE) == true)
{
WatchdogUnlock(WATCHDOG0_BASE);
}
//WatchdogReloadSet(WATCHDOG0_BASE, ROM_SysCtlClockGet());
WatchdogReloadSet(WATCHDOG0_BASE, SysCtlClockGet()/10000); // This is a mistake
WatchdogResetEnable(WATCHDOG0_BASE);
WatchdogEnable(WATCHDOG0_BASE);
//IntMasterEnable();
//IntEnable(INT_WATCHDOG);

while(1)
{
WatchdogIntClear(WATCHDOG0_BASE);
//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

}
}

Share this post


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 :)
 
 

 

Share this post


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.

Share this post


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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×