I2C buses dead after firmware upgrade

The official PYBD running MicroPython, and its accessories.
Target audience: Users with a PYBD
Post Reply
pete
Posts: 2
Joined: Mon Jul 22, 2019 3:57 pm

I2C buses dead after firmware upgrade

Post by pete » Tue Aug 13, 2019 9:44 am

Hi,

it seems I managed to brick (somewhat) a Pyboard D by upgrading the firmware to the latest version from [https://micropython.org/download].

Set the device to DFU mode, downloaded the latest (matching) firmware, ran dfu-util - all went very smoothly:

[code]
macallan:~ pete$ dfu-util --alt 0 -D ~/Downloads/PYBD-SF2-20190813-v1.11-194-g3d02ebb4e.dfu
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Match vendor ID from file: 0483
Match product ID from file: df11
Opening DFU capable USB device...
ID 0483:df11
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Internal Flash "
file contains 1 DFU images
parsing DFU image 1
image for alternate setting 0, (2 elements, total size = 900800)
parsing element 1, address = 0x08008000, size = 410176
Download [=========================] 100% 410176 bytes
Download done.
parsing element 2, address = 0x90000000, size = 490608
Download [=========================] 100% 490608 bytes
Download done.
done parsing DfuSe file
[/code]

However now the PyBoard no longer sees any devices on the I2C bus (there are four TILE-LED36 on a WBUS-DIP68 connected, and a known good PyBoard D is able to see and control them):

[code]
>>> i2c=machine.I2C("X")
>>> i2c.scan()
[]
[/code]

I get the same result on bus Y when I connect a LED36 to my DIP28, so this seems more like a general I2C issue than with any particular hardware device.

Unfortunately I didn't upload the old firmware first, so I can't go back right now ... what can I do to debug/resolve this?

Best regards,

Peter.

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

Re: I2C buses dead after firmware upgrade

Post by jimmo » Tue Aug 13, 2019 12:10 pm

I think there was a change since the original firmware to not enable the external bus supply by default. You can control this with the 'EN_3V3' pin:

Code: Select all

>>> i2c = machine.I2C('Y')
>>> i2c.scan()
[]
>>> machine.Pin.board.EN_3V3.value(1)
>>> i2c.scan()
[60]

pete
Posts: 2
Joined: Mon Jul 22, 2019 3:57 pm

Re: I2C buses dead after firmware upgrade

Post by pete » Tue Aug 13, 2019 12:19 pm

Bingo! That did it.

Thanks a lot!

Post Reply