logo elektroda
logo elektroda
X
logo elektroda

How to configure and use the hardware watchdog on the ESP8266?

pier 3954 8
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16775994
    pier
    Level 24  
    Welcome.

    Fellows how do I embrace the hardware watchdog on the ESP8266?
    I searched I read that esp has a software watchdog and a hardware watchdog but I don't grasp it.

    I would like to do it like in Bascom, I set the hardware watchdog for some time and then in the program I reset it, when the program stands the watchdog will take care of the rest.
    Or can someone link some intelligible material?

    Regards.
  • ADVERTISEMENT
  • #2 16776698
    kamyczek
    Level 38  
    Bascom does not support the ESP8266 you have to use for example ardruino, because there is support for the esp8266. Bascom is a rather poor tool to start with, if you want to do something sensible, you need to switch to some more sensible programming tools ...
  • ADVERTISEMENT
  • #3 16776880
    pier
    Level 24  
    The topic was set up in the Arduino section but Admin.... Ah...

    Moderated By tmf:

    Please read the section descriptions. ESP has nothing to do with Arduino, Topics related to ESP and similar modules are placed in the IoT section.



    Of course I want to do this in Arduino. I wrote about bascom because there I know how the watchdog works and I think it can be done similarly in ESP.
  • #4 16776957
    krzbor
    Level 28  
    I found two interesting pages regarding Watchdog: Link and Link Maybe they will help?
  • ADVERTISEMENT
  • #5 16777850
    Anonymous
    Anonymous  
  • #6 16778004
    pier
    Level 24  
    niveasoft wrote:
    Not to be hearsay like colleagues.

    I solved/predicted the reset in such a way that I ping to Google server 8.8.8.8 while testing the command responses. If there is no response or response to commands then

    DDRB.x=1 ;
    delay(1);
    DDRB.x=0;

    ..and resetting the state machine variables, i.e. the initialisation command sequence..this is because it's intended to pass a new password to the WiFi

    The state of the pin as an output will apply "ground" to the pin connected to the ESP Reset pin. If you never put 5V in there then ESP will be fine, if you are worried about it then put a Schottky diode in there and then the AVR will only be able to short the pin to ground and 5V will never appear on ESP.

    I'm even counting the resets and I don't have any in one device which is currently sitting on my desk and has been working with the network for three days (software upload)

    @R-MIK Don't measure all programs written in Bascom by your yardstick.... (read-as you or someone else wrote it).
    It takes me a similar time to adapt a found library..a few hours and I have no problem with it at all.


    Thanks for the idea. I would prefer this watchdog though since it is.

    TMF how does ESP have nothing to do with Arduino?
    After all, most of the software on ESP is actually in Arduino. I use Arduino myself.
  • ADVERTISEMENT
  • #7 16778017
    Anonymous
    Anonymous  
  • #8 16778033
    pier
    Level 24  
    But I don't need it for AT commands.
    I have a program written in Arduino for ESP and I wanted to put the watchdog there.
  • #9 16778038
    Anonymous
    Anonymous  
ADVERTISEMENT