Pico Freeze

Posted on
  • Hello Espruinos

    A few days ago two fix installed picos has frozen. I was not able to connect over USB anymore.
    After disconnect and reconnect the power (5 Volt) everything was back and working.

    The only thing i saw was that one connected relay has switched on and off just before the freeze.

    The picos are connected to a little psu with 5V out at the batterie connector. I did not know what happend. Maybe a little little poweroutage. But no other devices are affected.

    I expected a reboot, not a freeze.

    Are there any recommandations to stable the power ? Installing a capacitor ?

    Many thanks for your help

    Sacha

  • You can get 'brown outs' - where the voltage goes so low that the MCU stops working (probably the oscillator), but not low enough to get it to reset.

    Have you been able to look at the voltage on an oscilloscope? If you're using WiFi, a biggish (47uF) capacitor is probably a good idea (on the 3.3v line), but you could probably do the same on the 5v line as well.

    To stop complete freezes, you could enable the watchdog timer: http://www.espruino.com/Reference#l_E_en­ableWatchdog

    It's a separate bit of hardware that will reset the Pico if the interpreter doesn't get around to the idle loop in the time period you have specified. If you use something like 10 seconds then even with very lengthy bits of code running the Pico is very unlikely to reset unless it totally locks up.

  • Thank you very much Gordon. The Watchdog is such a usefull hint.

    Sacha

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Pico Freeze

Posted by Avatar for Sacha @Sacha

Actions