HomeNewsIndia NewsImproving IoT System Robustness Using Watchdog Timers

    Improving IoT System Robustness Using Watchdog Timers

    That said, it’s the smart watchdog software that truly makes the watchdog “smart” and that’s where developers need to pay attention and create a little bit of code. Be aware that the code doesn’t have to be complicated, in fact, the simpler the better! Small, simple, provable software is best for a watchdog. A simple code example for the MSP430, inspired by the TPL5010 Evaluation Module documentation, is shown (Code listing):

    static volatile bool Reset = true;
    void main(void)
    {
    WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
    P1OUT |= BIT0; // Set P1.0 to high
    P1DIR |= BIT0; // Set P1.0 to output direction
    P1DIR &= ~BIT1; // Set P1.1 to input direction
    P2IES &= ~BIT0; // P2.0 Lo/Hi edge
    P2IFG &= ~BIT0; // P2.0 IFG Cleared
    P2IE |= BIT0; // P2.0 Interrupt Enabled

    while(1)
    {
    __delay_cycles(500000); // Set Delay

    // If true then the heartbeat was not received
    if(Reset == true)
    {
    // The heartbeat was not received. Reset the processor
    P1OUT &=~ BIT0;
    __delay_cycles(100); // Set Delay
    P1OUT |= BIT0;
    Reset = false;
    }
    else
    {
    Reset = true;
    }
    }
    }
    // Port 2 interrupt service routine
    #pragma vector=PORT2_VECTOR
    __interrupt void Port_2(void)
    {
    P2IFG &= ~BIT0; // P2.0 IFG Cleared
    P2IE |= BIT0; // P2.0 Interrupt Enabled
    Reset = false;
    }

    Code listing: Example MSP430 software to monitor the microcontroller heartbeat. If the heartbeat is not received within the expected period, then the microcontroller is reset. (Source: Inspired by Texas Instruments’ SNAU173 Application Note).

    The example code shows the smart watchdog being initialized and then waiting a specific time before checking to see if the microcontroller should be restarted. The smart watchdog sets the Reset variable to true, assuming that the microcontroller has failed. It is up to the microcontroller to send the heartbeat pulse, which triggers the interrupt that sets the Reset variable back to false. There are plenty of features that could be added to the sample code such as:

    • Windowed watchdog
    • Entering low power states
    • Clearing the TPL5010 that is watching the smart watchdog
    • Monitoring communication lines
    • Tracking how many resets have occurred
    • The possibilities are limited only by what is truly necessary to ensure a robust design.

    Conclusion
    Security for the IoT is important, but developers would do well to not lose sight of system robustness. For this, watchdogs are going to play a critical role in the IoT as devices are not only deployed into the field far from human access, but are also expected to operate nearly flawlessly 24 hours a day, 7 days a week. Internal watchdogs provide developers with minimal recovery opportunities, while external watchdogs and smart watchdogs with a bit of extra software, open the field to robust and recoverable designs.

    ELE Times Bureau
    ELE Times Bureauhttps://www.eletimes.ai/
    ELE Times provides a comprehensive global coverage of Electronics, Technology and the Market. In addition to providing in depth articles, ELE Times attracts the industry’s largest, qualified and highly engaged audiences, who appreciate our timely, relevant content and popular formats. ELE Times helps you build awareness, drive traffic, communicate your offerings to right audience, generate leads and sell your products better.

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here

    Related News

    Must Read

    KYOCERA AVX RELEASES NEW KGP SERIES STACKED CAPACITORS

    KYOCERA AVX released the new KGP Series commercial-grade stacked...

    Microchip Unveils First 3 nm PCIe Gen 6 Switch to Power Modern AI Infrastructure

    Switchtec Gen 6 PCIe Fanout Switches deliver extra bandwidth,...

    Nuvoton Launches Arbel NPCM8mnx System-in-Package (SiP) for AI Servers and Datacenter Infrastructure

    Breakthrough BMC Innovation Powers Secure, Scalable, and Open Compute...

    STMicroelectronics joins FiRa board, strengthening commitment to UWB ecosystem and automotive Digital Key adoption

    STMicroelectronics has announced that Rias Al-Kadi, General Manager of the...

    NEPCON ASIA 2025: Showcasing the Future of Smart Electronics Manufacturing

    NEPCON ASIA 2025, taking place from October 28 to...

    Renesas Expands Sensing Portfolio with 3 Magnet-Free IPS ICs & Web-Based Design Tool

    New Simulation & Optimization Platform Enables Custom Coil Designs...

    IEEE IEDM, 2025 Showcases Latest Technologies in Microelectronics, Themed “100 Years of FETs”

    The IEEE International Electron Devices Meeting (IEDM) is considered...

    OMNIVISION Introduces Next-Generation 8-MP Image Sensor For Exterior Automotive Cameras

    OMNIVISION announced its latest-generation automotive image sensor: the OX08D20, 8-megapixel (MP) CMOS...

    Vishay Intertechnology Expands Inductor Portfolio with 2000+ New SKUs and Increased Capacity

    Vishay Intertechnology, Inc. announced that it has successfully delivered...