Bluepill: Will not power up via USB

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
Posts: 5
Joined: Mon Jan 23, 2017 10:15 am

Re: Bluepill: Will not power up via USB

Postby johnwigley » Tue Jan 24, 2017 2:26 pm

RogerClark wrote:
johnwigley wrote:
... now I have to figure out how you flash them a second time as they appear as serial ports rather than DFU devices, though I'm sure there's a FAQ on dealing with that.

If you select the com port in the IDE, it then the MapleUpload tool (jar) sends a reset sequence via serial data + control lines which resets the board into DFU for upload.

I thought I seemed to remember reading that the generic boards don't have this USB reset functionality, or that at least it doesn't seem to work on my boards?

Though then when trying to make sense of this USB reset code, it looks as though you've written a piece of code which does this DSR magic toggling sequence BUT on Windows it's not included for some reason? I can see it in the Tools/Linux folder but not in the Tools/Windows folder, and when I closely watch the debug output from the Arduino console during programming, it shows that it cannot find the usb_reset code:

"error resetting after download: usb_reset: could not reset device, win error: The system cannot find the file specified."

Which would explain my lack of success, however I finally realised that the STM32duino boot loader momentarily goes into DFU mode when first attached for a second or so - which is why on Windows when plugged in, you hear the USB attach (as DFU), USB detach (as DFU), USB attach (as Serial) sounds - I'd thought at first I'd got a dodgy USB connection.

And so by plugging the device in at the right time when it's looking for a DFU device in the programming stage, then I can successfully reflash the devices. It may be worth adding this as a FAQ item, as although now I understand whats happening, and can follow the forum postings etc which do actually mention people plugging it in at the right moment in the programming cycle when it's looking for a DFU device - it really was not at all obvious for me, that that's what I needed to do.

Be interested to know though - what the deal is with the missing usb_reset code on Windows, is that deliberate because it's handled elsewhere, or a mistake?

Thanks, John

Return to “Generic STM32F103”

Who is online

Users browsing this forum: MSNbot Media and 2 guests