Jump to content

Search the Community

Showing results for tags 'watchdog'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 8 results

  1. Can someone provide a code for implementing a watchdog timer to autoreset in TIVA TM4C1294ncpdt using energia?
  2. Hi guys, I'm new with TI CC13x0, can anybody help me with watchdog for CC1310? Or any links for my reference? Thank you
  3. Hi, do anybody has a simple software watchdog script for cc3200. Kind of frustrated now as spending a lot of time to build a HW reset, only to realise that the RESET on the 20 pin connector is only an output... regard,
  4. Dear Friends, Now i am working with CC3220SF evaluation kit, i wan't to add watch dog code to my base code,i was trying to create a code for CC3220SF in past 15 days but i get errors so i am trying in multiple examples likehttps://forum.43oh.com/topic/9346-cc3200-watchdog/https://forum.43oh.com/topic/11170-watchdog-in-cc3200/these examples does not work for my CC3220SF because these examples are support only CC3200 boards, i don't know how to create watchdog header's for CC3220SF, can you please help me to find the correct example for CC3220SF.
  5. Hello. I need to use the watchdog but I can't find any information about it. Can someone help me please?
  6. Hi All, I have a problem with the watchdog timer reset. I am using Energia with a CC3200 on a custom board but the same issue occurs with a Launchpad. I have cut down the code to demonstrate the problem it is part of a much larger project which has a process control element and needs a watchdog timer. I have cobbled the demo together from all over the place so there are many different coding styles (smells) used - sorry It is spread over 2 tabs The full project has 30. From my reading, the reset functions are unreliable so TI suggests, test if the system has recovered from a watchdog reset then hibernate the CC3200. Then wake it up shortly after to ensure a clean reset. This seems to work until you connect to a network. I have tried to exit the network connection gracefully but I might have missed a step, my knowledge of the underlying network stuff is not so good. The demo code started from the scan network demo that installs with Energia. The watchdog stuff comes from the TI SDK. When recovering from the reset the program or processor hangs when you try to run WiFiInit() but not all the time. I have tried different delays in different places to let the Network processor catch up but no success This program is set up to continually time out the watchdog so there is no need to tell me that I am not servicing the watchdog. It would be great if someone can offer some insight into how to solve this Trevor Tab named WatchdogTest #include <WiFi.h> #include <WiFiClient.h> #include <WiFiServer.h> #include <WiFiUdp.h> #include "driverlib\prcm.h" #define debug 1 #define Buzzer RED_LED // GPIO24 pin 17 #define BEEP 100 unsigned long ulResetCause; // moved to wdt.ino int WiFiDisconnectErr; uint8_t watchdogResetFlag; uint8_t watchdogIntClearFlag; uint32_t g_ulWatchdogCycles=0; uint32_t g_bFeedWatchdog=1; // your network name also called SSID char ssid[33] = "YourSSID"; // your network password char password[65] = "YourPassword"; void setup() { pinMode(Buzzer,OUTPUT); // for the purpposes of this demo the buzzer is redirected to the red LED on the launchpad board digitalWrite(Buzzer, LOW); //sound a chirp on the buzzer digitalWrite(Buzzer, HIGH); delay (BEEP); digitalWrite(Buzzer, LOW); Serial.begin(115200); Serial.println("Ok..."); recoverFromWatchdog(); wdt(); WiFi.init(); Serial.println(WiFi.firmwareVersion()); // Print WiFi MAC address: printMacAddress(); // scan for existing networks: Serial.println("Scanning available networks..."); listNetworks(); // attempt to connect to Wifi network: if (debug)Serial.print("Attempting to connect to Network named: "); // print the network name (SSID); if (debug)Serial.println(ssid); // Connect to WPA/WPA2 network. Change this line if using open or WEP network: WiFi.begin(ssid, password); while ( WiFi.status() != WL_CONNECTED) { // print dots while we wait to connect if (debug)Serial.print("."); delay(300); } if (debug)Serial.println("\nYou're connected to the network"); if (debug)Serial.println("Waiting for an ip address"); while (WiFi.localIP() == INADDR_NONE) { // print dots while we wait for an ip addresss if (debug)Serial.print("."); delay(300); } // you're connected now, so print out the status printWifiStatus(); } void loop() { uint32_t slowClockVal; if (watchdogResetFlag) { watchdogResetFlag =0; if (WiFi._connecting) { WiFiDisconnectErr = WiFi.disconnect(); Serial.println(WiFiDisconnectErr); delay(50); WiFiDisconnectErr = WiFi.disconnect(); Serial.println(WiFiDisconnectErr); delay(50); } } if (watchdogIntClearFlag) { watchdogIntClearFlag =0; Serial.print("Clear WD int "); Serial.println(g_ulWatchdogCycles); Serial.print("Slow Clock Value ....... "); slowClockVal = (uint32_t)PRCMSlowClkCtrGet(); Serial.println(slowClockVal); digitalWrite(Buzzer, HIGH); delay (BEEP); digitalWrite(Buzzer, LOW); } } void printMacAddress() { // the MAC address of your Wifi byte mac[6]; // print your MAC address: WiFi.macAddress(mac); Serial.print("MAC: "); Serial.print(mac[5], HEX); Serial.print(":"); Serial.print(mac[4], HEX); Serial.print(":"); Serial.print(mac[3], HEX); Serial.print(":"); Serial.print(mac[2], HEX); Serial.print(":"); Serial.print(mac[1], HEX); Serial.print(":"); Serial.println(mac[0], HEX); } void listNetworks() { // scan for nearby networks: Serial.println("** Scan Networks **"); int numSsid = WiFi.scanNetworks(); if (numSsid == -1) { Serial.println("Couldn't get a wifi connection"); while (true); } // print the list of networks seen: Serial.print("number of available networks:"); Serial.println(numSsid); // print the network number and name for each network found: for (int thisNet = 0; thisNet < numSsid; thisNet++) { Serial.print(thisNet); Serial.print(") "); Serial.print(WiFi.SSID(thisNet)); Serial.print("\tSignal: "); Serial.print(WiFi.RSSI(thisNet)); Serial.print(" dBm"); Serial.print("\tEncryption: "); printEncryptionType(WiFi.encryptionType(thisNet)); } } void printEncryptionType(int thisType) { // read the encryption type and print out the name: switch (thisType) { case ENC_TYPE_WEP: Serial.println("WEP"); break; case ENC_TYPE_TKIP: Serial.println("WPA"); break; case ENC_TYPE_CCMP: Serial.println("WPA2"); break; case ENC_TYPE_NONE: Serial.println("None"); break; case ENC_TYPE_AUTO: Serial.println("Auto"); break; } } void printWifiStatus(void) { // print the SSID of the network you're attached to: if (debug)Serial.print("Network Name: "); if (debug)Serial.println(WiFi.SSID()); // print your WiFi shield's IP address: IPAddress ip = WiFi.localIP(); if (debug)Serial.print("IP Address: "); if (debug)Serial.println(ip); } Tab named wdt #include "driverlib\wdt.h" #include "driverlib\utils.h" #include "driverlib\prcm.h" //unsigned long ulResetCause; void recoverFromWatchdog(void) { // This is here to clean up after a watchdog reset // Get the reset cause // ulResetCause = PRCMSysResetCauseGet(); // // If watchdog triggered reset request hibernate // to clean boot the system // if( ulResetCause == PRCM_WDT_RESET ) { HIBEntrePreamble(); MAP_PRCMOCRRegisterWrite(0,1); MAP_PRCMHibernateWakeupSourceEnable(PRCM_HIB_SLOW_CLK_CTR); MAP_PRCMHibernateIntervalSet(330); MAP_PRCMHibernateEnter(); } } void wdt(void) // this is the system watchdog { MAP_PRCMPeripheralClkEnable(PRCM_WDT, PRCM_RUN_MODE_CLK); MAP_WatchdogUnlock(WDT_BASE); MAP_WatchdogIntRegister(WDT_BASE,WatchdogIntHandler); MAP_WatchdogReloadSet(WDT_BASE,40000000*5); //35 seconds 40000000 is half the clock frequency 80 MHz /2 MAP_WatchdogEnable(WDT_BASE); } void wdtReset(void) // this is the software reset { MAP_WatchdogUnlock(WDT_BASE); MAP_WatchdogReloadSet(WDT_BASE,40000000 * 2); // 2 seconds give the system time to close network connections } //***************************************************************************** // //! Mandatory Configuration to put the PM into safe state before entering hibernate //! //! \param None //! //! \return None // //***************************************************************************** static inline void HIBEntrePreamble() { HWREG(0x400F70B8) = 1; UtilsDelay(800000/5);//delay(2); HWREG(0x400F70B0) = 1; UtilsDelay(800000/5);//delay(2); HWREG(0x4402E16C) |= 0x2; UtilsDelay(800);//delay(1); HWREG(0x4402F024) &= 0xF7FFFFFF; } //***************************************************************************** // //! The interrupt handler for the watchdog timer //! //! \param None //! //! \return None // //***************************************************************************** void WatchdogIntHandler(void) { // // If we have been told to stop feeding the watchdog, return immediately // without clearing the interrupt. This will cause the system to reset // next time the watchdog interrupt fires. // if(!g_bFeedWatchdog) { return; } // // After 10 interrupts, switch On LED6 to indicate system reset // and don't clear watchdog interrupt which causes system reset // if(g_ulWatchdogCycles >= 3) { // if (client)client.stop(); watchdogResetFlag++; MAP_UtilsDelay(800000); return; } // // Clear the watchdog interrupt. // MAP_WatchdogIntClear(WDT_BASE); watchdogIntClearFlag++; // // Increment our interrupt counter. // g_ulWatchdogCycles++; }
  7. Hi, guys, I cannot seem to be able to stop the watchdog on the Energia + MSP432 combo. (MSP-EXP432P401R Rev 1.0 + Energia 0101E0016 on Win7-64bit) // My minimal code buzzes the red led at 2MHz: #include "msp432p401r.h" void setup() { WDTCTL = WDTPW | WDTHOLD; // Stop WDT pinMode(RED_LED, OUTPUT); // configure pin } void loop() { while (1) { P2OUT ^= 0x01; P2OUT ^= 0x01; // flip pin twice }; } The 2MHz output signal freezes for 12us in either "1" or "0" state every 1ms. WDTHOLD bit does not help (in fact, any WDTCTL actions seem to be ignored). Cross testing done: - TI CCS Cloud correctly builds C code for same MSP-EXP432 board (i.e. WDTCTL line does make a difference there) - Same Energia IDE correctly builds equivalent code for a MSP-EXP430G2 /2452 board (WDTCTL line again does make a difference). (In addition, if it matters: pure C compiling in Energia as per https://bennthomsen.wordpress.com/engineering-toolbox/ti-msp430-launchpad/using-energia-to-code-in-c/ does not work for the 432 (compiles and flashes OK, but board remains dead) while it does work for a plain ol' 430 board.) There, hope there's enough data. Any ideas? Thanks a lot! Matjaz
  8. I am currently working on a project that uses the external crystal for the watchdog timer and the internal DSO clock for all other tasks. The crystal is 32kHz. The watchdog timer interrupt is taking care of controlling the state machine in the main loop. At first sight everything looks ok. However, after a while (hours later) the controller (MSP430G2553) appears to be stuck. Closer investigation show that this is due to the watchdog timer interrupt not served, means that the 32Khz clock is not present. I already tried to play with the XTAL capacitor settings to no effect. I am wondering if scope measures could be done in order to see if there is something ongoing in the clock circuit that could point to an issue with the XTAL capacitors, driver circuit, parasitics, etc. However, I do not know what exactly to look for. Can anyone help me here?
  • Create New...