Jump to content

Recommended Posts

I was able to get it working using the functions from the original Stellarisware driver.

#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"

void setup()

void loop()
  //Watchdog Stuff

  if(WatchdogLockState(WATCHDOG0_BASE) == true)

  WatchdogReloadSet(WATCHDOG0_BASE, ROM_SysCtlClockGet());

    //do stuff

My only remaining problem is that I need to know when the watchdog triggered a reset. There must be some way to read the Reset Source at startup but I couldn't find anything on that :/


Alternatively I could use the Watchdog ISR, but as far as I understand it, it has to be defined in the vector table in "startup_gcc.c" and implemented in "WInterrupts.c". But these files are compiled at startup of Energia (I'm running on the latest git version), so I've got no way to pass variables between it and my main file :?

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...