Skip to main content
Visitor II
March 7, 2020
Question

How to internally Restart a STM8 if we lost Program control ?

  • March 7, 2020
  • 4 replies
  • 2839 views

We are using STM8 as to monitor and control STMF07 controller and Quectel M66 module if they are not sending pulses in predetermined time. But no physical control or method to reset STM8, So can we restart the program control of STM8 through software, if STM8 program control is lost or it is stuck somewhere. We want to restart STM8, if STM8 stops working. Can a controller monitor itself for hang state? Any help is appreciated.

    This topic has been closed for replies.

    4 replies

    Graduate II
    March 7, 2020

    Look for watchdog functionality - AN3265.

    sanket47Author
    Visitor II
    March 7, 2020

    Thank you for your response, we are using watchdog in our code but we found in our testing device that STM8 was in hang state as M66 was working, STMF07 was hang sate but STM8 did not able to reset STMF0 after not receiving heartbeat from STMF0. And what we thought during Design, we need not reset STM8 through programming. So STM8 is on once Powered by 12 V and after 20-25 days STM8 is in hang state (Till now Our observation) , So is there any option that to kick alive STM8 on its own?? As we dont have any control on STM8 externally.

    Graduate II
    March 7, 2020

    > after 20-25 days STM8 is in hang state

    Maybe 24,855 days? Probably a typical 2^31 ms type bug.

    sanket47Author
    Visitor II
    March 7, 2020

    Can you pin point what is issue we are missing on ??

    Graduate II
    March 7, 2020

    Going to be hard if you didn't facilitate via the reset pin.

    Odd watchdog on either STM8 or STM32 doesn't work.

    Perhaps a latch up.

    You really need to root cause the failure and fix it if a software issue. Have device output enough internal state info so you're not entirely blind. Find ways to accelerate or cause failure more quickly so you aren't doing it for months.​

    sanket47Author
    Visitor II
    March 7, 2020

    Yes we are working on it, but I thought I should also ask the community about this issue.

    Graduate II
    March 7, 2020

    Make sure reset pins are not driven high by push-pull drivers.

    Random lockups you can't attribute to anything will be pure guesses from the community. You need some actionable data to work from.

    In your respin​ of the board consider external watchdog devices

    Visitor II
    March 13, 2020

    If you don't use the watchdog correctly, it doesn't help much!

    How exactly do you use the watchdog? I have a project with STM8 that run continuously for 10 months now, without restart, and no problems whatsoever.

    You should also do some debugging, to know what actually happens, what the STM8 is doing in "hang"-mode.