Olimexino STM32 board bricked!

Maple Mini, Maple Rev3, Maple Rev 5 and Maple Ret 6, iTead Maple etc
Post Reply
Phono
Posts: 68
Joined: Thu Mar 19, 2020 9:32 am

Olimexino STM32 board bricked!

Post by Phono »

I have a project where I use the CAN bus. As you all know, this prevents the USB from working simultaneously on a STM32F1, so a special trick is required to use DFU programming.
What I usually do is to start the upload from the Arduino IDE, and when the log says:
Searching for DFU device [1EAF:0003]...
Assuming the board is in perpetual bootloader mode and continuing to attempt dfu programming...
I quickly connect the USB cable from the computer onto the Olimex board. Normally the DFU device is enumerated and the upload starts.
Until yesterday where maybe the USB connector was not fully inserted, or whatever reason. The fact is the upload failed, and since then the board fails to enumerate the DFU device. On my computer, a faulty device is shown : "unknown USB device (device descriptor request failed)."
Long story short, my board is bricked.
However, the computer works perfectly with another board; in addition, the faulty board still operates normally with the last sketch uploaded to it.
So it seems that it is only the USB function that fails on this board.
I am wondering whether the bootstrap loader could have been damaged in some way by an aborted programming sequence? In this case I might be able to recover by flashing the BSL again using ST-Link for example? Or is it rather the physical USB interface (it is directly connected to two pins of the microcontroller) that has been damaged?
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Olimexino STM32 board bricked!

Post by ag123 »

well try flashing the boot loader again over swd.
other things are check the usb connectors etc, there are cases where the usb cable is faulty or where the connectors are frayed
Phono
Posts: 68
Joined: Thu Mar 19, 2020 9:32 am

Re: Olimexino STM32 board bricked!

Post by Phono »

Can you give me hints on the flashing procedure? Connections to make (I have a ST-Link module, but never used it), where to find the genuine bootloader file, etc?
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Olimexino STM32 board bricked!

Post by ag123 »

you can try roger's boot loader
https://github.com/rogerclarkmelbourne/ ... bootloader
but note that the binaries are build for maple mini or blue pills. you would need to check if things like the board led is at the same pin
maple mini uses PB1 for the led pin and blue pill (and various pill boards) use PC13 for the led pin (active low)
if that on the board is different, chances are that you would need to build from source
you can try some of the maple v3 or maple v5 binaries, but i'm not sure if after all they are the same.
the led is critical as otherwise after you installed the boot loader you won't see the blinks.

on another note, did the board blink on pressing reset? if it does your bootloader on your board is still working !
and all these isn't needed. and it is likely the problem is somewhere else (e.g. hardware, cable etc)

for st-link, you would need access to the swd pins, i think the swd pins is on a special micro jtag connector on the board
https://www.olimex.com/Products/Duino/S ... e-hardware
so you would need to get an adapter from olimex as well.
https://www.olimex.com/Products/ARM/JTA ... TAG-20-10/
the main pins you want to get at is SWDIO and SWCLK, the other 2 pins on st-link connectors are 3.3v and GND (that one is easy, just an alternate on the board)
if you are working in linux there is st-flash
https://github.com/texane/stlink/blob/m ... t-flash.md
in windows there is stm32cubeprogrammer
https://www.st.com/en/development-tools ... eprog.html

the alternative is to program the board from uart1 the uart boot loader, that use UART1 PA9 - TX and PA10 - RX pins. this one doesn't need the micro jtag adapter. and you need a usb-uart dongle. e.g.
https://www.ebay.com/sch/i.html?_from=R ... 2&_sacat=0
in addition, for that you need to access the boot0 pin - that is your 'user' button.
so the finger dance goes this way, press both reset and boot0 (user), release reset. release boot0 (user) 1 sec later

in windows that same stm32cubeprogrammer can be used
in linux the common favourite is stm32loader
https://github.com/jsnyder/stm32loader
Last edited by ag123 on Wed Apr 01, 2020 11:58 am, edited 1 time in total.
Phono
Posts: 68
Joined: Thu Mar 19, 2020 9:32 am

Re: Olimexino STM32 board bricked!

Post by Phono »

Thank you for all these details. To answer your question, the blink sequence at power up is perfectly normal, even the "button dance" to force the permanent bootloader mode works. So I should suspect the hardware... The USB cable I used works with another board. The only remaining component is the mini-USB connector; otherwise, the remaining hardware is inside the STM32. Maybe at connection time the connector did not implement the correct connection sequence (ground first, then data lines)? Since the board had its ground connected to my system at this time, there could have been a ground loop through the data lines that could have locally destroyed the pin pads or the USB hardware inside.
If this is the case, my board deserves the garbage bin.
ag123
Posts: 1653
Joined: Thu Dec 19, 2019 5:30 am
Answers: 24

Re: Olimexino STM32 board bricked!

Post by ag123 »

well, if you don't need usb, the other parts of it may still be working, that RB chip has quite a bit of extra gpio pins ;)
i've been thinking about using an RB board for those pin greedy applications like keyboards and such, but olimex's board don't really fit that use.
that board is better for cases where you want to connect and use quite a bit of peripherals such as lcd +spi + adc + uart + i2c + usb
the higher pin counts means that you would be more likely to find non-overlapping pins for those pheriperials

but i had to agree usb is an important reason for using stm32f103*
the other thing would be to find out if usb is after all 'not responding', in linux i do a lsusb to see if a device shows up when it is connected.
i'm not sure about windows, perhaps you can try going to device manager and do a 'check for hardware changes' after connecting the board.
accordingly that does a usb reset and it may literally detect the device
Phono
Posts: 68
Joined: Thu Mar 19, 2020 9:32 am

Re: Olimexino STM32 board bricked!

Post by Phono »

Sadly, the board is detected by the computer, but it seems unable to identify itself so the computer does not regard it as a DFU device. USB is mandatory when you want to upload a sketch from the Arduino IDE. So my board is stuck to this version of my sketch forever.
stevestrong
Posts: 502
Joined: Fri Dec 27, 2019 4:53 pm
Answers: 8
Location: Munich, Germany
Contact:

Re: Olimexino STM32 board bricked!

Post by stevestrong »

The USB DFU bootloader is not a must, you can upload also via STLink with Arduino IDE, just select the appropriate upload method.
Phono
Posts: 68
Joined: Thu Mar 19, 2020 9:32 am

Re: Olimexino STM32 board bricked!

Post by Phono »

I ended up into taking my scope to see the signals on the USB data lines. One of them stays at level zero permanently, whereas I see traffic on the other one. It seems really that the USB hardware is faulty. Too bad.
Post Reply

Return to “Maple & Maple mini etc”