Unbricking PYB11

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
User avatar
jsonnet
Posts: 2
Joined: Thu Feb 27, 2020 11:28 am
Location: Saarland

Unbricking PYB11

Post by jsonnet » Thu Feb 27, 2020 12:01 pm

Hi all,

yesterday I had a strange events with my PYBv1.1. First of all it started printing same weird error messages on startup about not being able to import pyb, I think due to some name being too long or something like that. But I still could import pyb and use it normal afterwards. Later I though to myself let’s try to update the firmware on my board, for which I used dfu-uti, as I also had problems using the CAN controllers for sending and receiving with two sn65hvd230 chips but this is another story. When I set it into DFU Mode the blue, yellow and red LED glow up very dimly but I could successfully update the firmware with the latest available one.

This is were everything started to go down hills, after I powered the board back up the red and green led started flashing, suggesting an error with the main.py, so I though, okay let's just delete everything in there and start fresh, but I noticed the board wouldn't show up as a USB device anymore. So the first thing I did was to downgrade to the normal 1.12 version of upy, thinking there maybe something wrong with the latest version. But still again after successfully updating the firmware I still wasn’t available and was still flashing the red and green LEDs and then statically red . Next I did some digging and found out how to set it to safe mode. But again it started flashing and after 10 seconds or so, it showed a hard fault but cycling all leds.

So as a last resort I tried resetting it to factory default, but still again after supposedly restoring, it again started to flash and cycle it's LEDs as before. Then today I tried a SD Card with some data and a boot.py file freshly downloaded from the wiki, which should enable the REPL command prompt, but again after reading the card for a few seconds it starts flashing red and green, reboots and loops again. And with the internal storage flashes red and green and then statically red.

As a last resort is there maybe some kind of ftdi link or something else I could use to possibly debug the board and find the fault or is it once and for all bricked? :(

Cheers
Josh

User avatar
jimmo
Posts: 1421
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Unbricking PYB11

Post by jimmo » Thu Feb 27, 2020 12:41 pm

That does sound worrying.

So to put it in DFU mode you short BOOT0 to 3.3 V. What tool are you using to flash the dfu file? Can you share the output from the flashing.

FWIW, in DFU mode, my pyboard shows just the red and blue LEDs.

You might want to try doing a mass erase. If you're using dfu-util, the command is

Code: Select all

dfu-util --alt 0 -s :mass-erase:force -D pybv11-20191220-v1.12.dfu
jsonnet wrote:
Thu Feb 27, 2020 12:01 pm
As a last resort is there maybe some kind of ftdi link or something else I could use to possibly debug the board
The best tool is an st-link. You can get the clones fairly cheaply, otherwise all the ST nucleo boards have them built-in. It's a bit tricky to use this on the pyboard once MicroPython boots because it uses the SWD pins for other purposes, but one trick is to use it while the device is in dfu mode to mass erase and re-flash.

User avatar
jsonnet
Posts: 2
Joined: Thu Feb 27, 2020 11:28 am
Location: Saarland

Re: Unbricking PYB11

Post by jsonnet » Thu Feb 27, 2020 2:55 pm

Oh gosh, you won't believe what I did... I just noticed when copying your command, that I totally downloaded the wrong file. So just a note the firmware for the PYBv10 definitely does not work on the v1.1 :shock: :mrgreen:

But the mass erase definitely fixed everything and I am up and running again

Thanks :)
Josh

So next I can finally try and figure out the CAN Bus ;)

Post Reply