[WEACT_STM32F411CEU6] unable to re-flash firmware

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
User avatar
RobH
Posts: 46
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

[WEACT_STM32F411CEU6] unable to re-flash firmware

Post by RobH » Sat Aug 01, 2020 8:30 am

A few days ago I received my black-pill and I succeeded to build and flash Micropython V1.12-623 (without any extra flash), mem_free() shows 97600. I mounted external flash (on a separate board with M25Q128 connected as described in Readme.md), modified the mpconfigboard.h file as indicated and re-built the firmware.
However I cannot get the board in the proper state for dfu-util or pydfu.py anymore. Both report that they cannot find a DFU device.
The boot-reset button sequence seems not to have the desired effect. Importing pyb.bootloader is impossible: a terminal session shows heavy error reporting (in a loop?) which seems uninterruptible by a Ctrl-C or Ctrl-D (when A9 and A10 are connected before power-up).
What can I do?
Rob.

[addition aug 2]
Discovered a method to get the board in bootloader mode:
- disconnect USB
- connect pins A9-A10
- connect USB
- start a terminal session
- remove connection between A9-A10 (this terminates the error reporting)
- import pyb;pyb.bootloader()
Now the firmware can be refreshed!

User avatar
RobH
Posts: 46
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: [WEACT_STM32F411CEU6] unable to re-flash firmware

Post by RobH » Tue Feb 16, 2021 1:27 pm

I have updated Micropython several times and mostly without problems. But some times I get error messages like 'Pipe error' (don't recall the exact message text) and retries (with or without intermediate power-offs) fail. However after a few hours or the next day a retry appears to succeed in most cases. A mystery to me.

As far as I remember the Pipe error always appeared before any update activity. But today I saw an update of the first part and then the Pipe error came up. Now the board is totally unreachable: it doesn't show up with a lsusb command, not as disk and not with the the normal 'ttyACM0' in the list of USB serial ports (I'm working with Linux Mint 20). Even a via main.py automaticallly started 'blink-a-led' program is not showing activity.

So the board looks completely dead (apart from the power-led!). Can I recover it? How? What could be the reason of these update troubles and how can I prevent 'm?

Rob.

dukeduck
Posts: 21
Joined: Thu Aug 29, 2019 2:06 pm

Re: [WEACT_STM32F411CEU6] unable to re-flash firmware

Post by dukeduck » Wed Feb 17, 2021 3:25 pm

Not sure if it's related to your issue - I got my mine two weeks ago and had some trouble getting the board into dfu mode to flash the firmware, so I contacted the customer service of WeAct and they said it's due to the low temperature, and you need to warm up the oscillators and the MCU with your hands for a while. I tried and it worked. This issue is documented in https://github.com/WeActTC/MiniF4-STM32 ... %AE%A4.pdf (only in Chinese)

User avatar
RobH
Posts: 46
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: [WEACT_STM32F411CEU6] unable to re-flash firmware

Post by RobH » Thu Feb 18, 2021 11:00 am

@dukeduck: Thanks! Although the temperature in my room is quite constant, I tried it, but it didn't help.
I am afraid that when the device doesn't show up in the list of USB devices it must be considered dead.
Remains the question why and how it could die with a firmware update... I would like to prevent that next time!

User avatar
dhylands
Posts: 3599
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: [WEACT_STM32F411CEU6] unable to re-flash firmware

Post by dhylands » Thu Feb 18, 2021 3:52 pm

So you're saying that you're unable to enter DFU mode?

If you can successfully get into DFU mode, then I'd try to do a mass erase. I wrote up a script to do that here:
https://github.com/dhylands/upy-example ... s-erase.sh

Once you've done the mass erase you can then try reflashing the firmware. Doing a mass erase will erase the filesystem, whereas just programming the firmware will not.

User avatar
RobH
Posts: 46
Joined: Fri Mar 23, 2018 3:37 pm
Location: Netherlands
Contact:

Re: [WEACT_STM32F411CEU6] unable to re-flash firmware

Post by RobH » Fri Feb 19, 2021 12:56 pm

@dyhlands: I'm not able to get it in DFU mode.
The board in its current state doesn't show up as USB device (with a Linux lsusb command). I'm afraid I must conclude that it is dead.
Thanks, Rob.

Post Reply