Bug in Pico v80 firmware - flickering LEDs onInit

Posted on
  • Just received my first Pico :)

    I've upgraded to the latest firmware (v80) and pushed code to switch both LEDs on at startup. It works perfectly, until you remove the Pico for longer than a few seconds.

    See https://www.youtube.com/watch?v=MTs-2pfqvhE

    Any thoughts?

    Thanks

  • Maybe you can put your code in order for us to reproduce the problem.

  • It's just...

    LED1.write(1);
    LED2.write(1);

    Thanks.

  • My pico is updated to V80 and I have no problem with your code even if I let it powered off for more than 10 seconds. No flicker.
    Are sure this is not an issue with your USB dock?

  • Yep.

    I've tried multiple USBs, 2 on the front of the PC, the one you see in the video and one used to charge my mobile.

    Perhaps it's a faulty Pico...

  • Could you do a

    dump()
    

    at the console and show us the result?

  • It looks like it has something to do with the charge in the caps, hence the waiting a few seconds with it unplugged triggering it.

    The voices in my head are saying it's the USB port's current limiting briefly disconnecting power because it's unhappy about the inrush current....

  • This does look pretty strange - if the power was getting disconnected then you'd expect the Pico to reboot as well, not the lights to just flicker. About all I could think (if it is a hardware problem) is that the Pico has been shorted out at some point and the diode that transfers power from USB got fried.

    As @Chris said, can you type dump() on the left-hand side and see what it says there?

    Also, you could try downgrading to the previous firmware to see if it really was the upgrade that caused the problem. Go here and find the version you want - files should be of the form espruino_1v##_pico_1r3_wiznet.bin. Then right-click on it, copy link, and paste it into the text box under 'Advanced Flashing' in the Web IDE's settings page.

  • I have since flashed with 1v80.39 and it no longer exhibits this issue.

    If I get chance, I'll roll back and see if I can replicate it again.

  • Thanks, that'd be great.

    Glad it's fixed now - it was remarkably strange behaviour.

    Are you sure your code wasn't something nearer:

    var x=false;
    setInterval(function() {
      x=!x;
      LED1.write(x);
      LED2.write(x);
    }, 20);
    

    In this case, you might expect it to take a few seconds before the lights blink at the right frequency. The internal hardware oscillator takes a few seconds before the frequency stabilises, but your code starts running before that point, so unless you delay, the initial timings can be off by quite a bit.

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

Bug in Pico v80 firmware - flickering LEDs onInit

Posted by Avatar for PaulMoore @PaulMoore

Actions