Search the Community

Showing results for tags 'Reset'.

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


  • Community Calendar

Found 8 results

  1. Good morning. I've been using the MSP430 launchpad and programming it using Energia 18. Anyway, for the whole time I've been using Energia, it very often have to unplug and plug back in my device in order to send it another build. Have any of you seen this problem before? Sometimes it works without having to unplug the hardware, however, over 50% of the time, I have to unplug the LaunchPad in order to upload new code to it from Energia. It seems to get hung while attempting the upload. So, to overcome this, I unplug the Launchpad, click the Upload button again, usually get an error, so I click Upload again and then it seems to start working. Another problem I've been having is that half the time, the Serial Debug output window doesn't show any output. I usually have to close it and re-open it in order to see the output. Also, sometimes, it just doesn't show any output no matter how many times I close and re-open it. Is this just me, or is it a bit iffy with the debug window and the upload? I'm doing all this on a Windows 8 box and have the latest Energia 18 on it. Any ideas to make it so I don't have to keep on unplugging/plugging in my device with each upload? Thanks much, Curtis
  2. Hey all, I recently got a Nokia 5110 LCD working using the LCD_5110 lib from GitHub. Works great, so thanks to giants whose shoulders I stand atop! I moved my chip (G2553) directly to the board as I have done several times before (with a pullup resistor on RST), and I loaded a little demo program on it with my "loader" board (just TEST, RST, GND, and VCC hooked up to the emulation side of an LP). Program loads and runs fine, but when I remove the loader and cycled power (I was just changing battery sources from a 6V pack to a 9V battery -- they are dropped to 3.3V), the LCD does not init properly. Sometimes resetting (disconnecting the RST pullup) would make it come back, sometimes not. The weird thing is that the sketch IS running, because the ISR to toggle the backlight DOES work -- but no text displays on the screen. When it gets this way, I hook up the loader again, flash the same program, and then everything works fine. If I unhook the loader and cycle the power, though, I am back to no text on screen. Am I initializing the screen incorrectly or doing something wrong in terms of power cycling and/or resetting? [incidentally, you'll see in the constructor for LCD_5110 that I use zero for the getButton() pin -- I don't need a button-getter, and would rather use my own button handling code instead of calling the LCD's getButton() method. What is the best way to call the constructor in that case? The zero works (compiles, anyway), and it looks like getButton() just hangs the program if I ever call it (so I won't). But surely I am missing something to use such an inelegant methodology...] Any help would be appreciated! Thanks, sutekh137 Sketch: //System/library includes. #include <LCD_5110.h> // Defines... #define TOGGLE_BACKLIGHT PUSH2 // Instantiate the Nokia 5110 LCD class (non-SPI): // LCD_5110 lcd(Chip Select, Serial Clock, Serial Data, Data/Command, Reset, Backlight, getButton() Trigger) LCD_5110 lcd(12, 13, 14, 15, 18, 19, 0); boolean glBacklight = false; void setup() { // Button will toggle back light using an ISR. pinMode(TOGGLE_BACKLIGHT, INPUT_PULLUP); attachInterrupt(TOGGLE_BACKLIGHT, ISR_ToggleBacklight, FALLING); lcd.begin(); lcd.setBacklight(glBacklight); lcd.text(0, 0, "Hello!"); delay(1000); lcd.clear(); lcd.text(0, 5, "Light off"); } void loop() { lcd.setFont(0); lcd.text(0, 5, glBacklight ? "Light on " : "Light off"); lcd.setFont(1); lcd.text(0, 2, " MSP430"); delay(200); } void ISR_ToggleBacklight() { delayMicroseconds(1000); if (digitalRead(TOGGLE_BACKLIGHT) != LOW) { return; } glBacklight = (glBacklight == 0); lcd.setBacklight(glBacklight); return; }
  3. I have an Energia project that seems to go astray under rare and seemingly random circumstances - it can occur anywhere from hours to months apart and I haven't been able to pin the cause down. It starts right up again after a reset. It isn't critical if it is down for a minute or so but I am usually not around to reset it manually. However, I can monitor things in the firmware and tell when things are not working correctly. In this situation it is easy enough to force a reset from Energia by writing to the watchdog timer and control register with an improper password. For example, in the following sketch the green LED will not turn on and the red LED will start flashing again after the reset. void setup() { pinMode(RED_LED, OUTPUT); pinMode(GREEN_LED, OUTPUT); digitalWrite(RED_LED, LOW); digitalWrite(GREEN_LED, LOW); } void loop() { unsigned int i; for (i = 1; i < 5; i++) { digitalWrite(RED_LED, HIGH); delay(500); digitalWrite(RED_LED, LOW); delay(500); } WDTCTL = 0x00; // causes a reset for(; { digitalWrite(GREEN_LED, HIGH); // this line is never reached } } Note: This is not using the watchdog timer in the normal fashion as Energia uses it for other timing functions. It is just a easy way to force a reset if needed.
  4. 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++; }
  5. Today my Metawatch Strata decided to completely lock up after charging, and now I can't reset it. I even tried the firmware updater (my Strata runs firmware 1.5.3, and there is 1.5.5 available), it tries to query the watch, but fails. So, does anyone have a tool that can reset the Metawatch via the charge / update clip so I can avoid opening it?
  6. Trying to find where I can restart to default my dev watch. I might be blind or I look in wrong places but nothing has helped me so far.
  7. I bought C2000 a 1 week ago. I started working today, have been working from last 6 hours. Problem is when ever I flash the program into the C2000 it gets uploaded but whenever I press reset button then program gets lost. All this is happening in Energia IDE. Correct me if I am doing something wrong. Reply asap Thank You
  8. I played with a MSP430F5510 over the weekend and had a problem: The chip got really warmed (too warm, touchable, but not burning hot) when I connected 4 pins (PWR, GND, RST, TEST) to a programming dongle (from the Chronos watch or from the EZ2500RF board). I checked everything and did see any short, or wrong polarity. CCS is able to flash some code into the F5510 chip in this condition, but it was slow and really warm (almost uncomfortable to hold my finger flat on it). I couldn't verify if it worked or not since I didn't have any test code, and the circuit wasn't complete (Just the chip on a break out board on a breadboard.). It didn't get warm/hot if I just connected GND and Vcc. The current draw in this condition was only 0.7mA. It only warmed up when I plugged the programming dongle with all 4 above mentioned pins. Then I looked around to see how people connect their F5510 in circuit and notice that they all have a resistor 47K connecting RST pin to Vcc. So I tried adding this resistor from RST pin to Vcc, and to my suprised the chip now stays cool even if I plugged the programming dongle to my circuit. The programming is smooth and fast now. If I now connect this 47K from RST to GND, the MSP430F5510 also gets hot, so back to Vcc it goes. I tried a code that flashes an LED on P1.0 and it worked. So the chip is still alive, I think. But is the chip supposed to get so warmed when the reset pin is hold low? Any idea? Thanks -Thanh