Forum > Embedded - ARM

Is this STM32 bricked ???

(1/2) > >>

petex:
hello,

I programmed the STM32 with the USB bootloader from Roger Clarkes website :
https://github.com/rogerclarkmelbourne/STM32duino-bootloader

When I plug the USB in it is recognised by the PC and a virtual port is created. When I press the reset button it flashes the LED momentarily.

However I have these problems:-
1) The GDB server does not run on my PI from the OpenOcd command


--- Quote ---pi@PIZERODEV:~/bootloader $ sudo openocd
Open On-Chip Debugger 0.11.0-rc2+dev-00002-g427552c07-dirty (2021-01-28-16:19)
Licensed under GNU GPL v2
For bug reports, read
   http://openocd.org/doc/doxygen/bugs.html
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : clock speed 1006 kHz
Error: Error connecting DP: cannot read IDR


Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections


--- End quote ---

2) If I try to run any simple programs from the Arduino IDE, nothing happens....

--- Quote ---Sketch uses 15988 bytes (12%) of program storage space. Maximum is 131072 bytes.
Global variables use 3128 bytes (15%) of dynamic memory, leaving 17352 bytes for local variables. Maximum is 20480 bytes.
maple_loader v0.1
Resetting to bootloader via DTR pulse
Searching for DFU device [1EAF:0003]...
dfu-util - (C) 2007-2008 by OpenMoko Inc.
Couldn't find the DFU device: [1EAF:0003]
This program is Free Software and has ABSOLUTELY NO WARRANTY


--- End quote ---

3) if I move the BOOT0 link to program mode and press reset, I cannot get the STM Flash Loader Demo program to recognise the device.


Does this mean the card is bricked ?? How can I do a factory reset and completely wipe out the USB bootloader and resume the original serial link loader ??


ps
If I view the virtual com port, i get this....

--- Quote ---
Congratulations, you have installed the STM32duino bootloader
See https://github.com/rogerclarkmelbourne/STM32duino-bootloader


For more information about Arduino on STM32
See https://www.stm32duino.com



Congratulations, you have installed the STM32duino bootloader
See https://github.com/rogerclarkmelbourne/STM32duino-bootloader


For more information about Arduino on STM32
See https://www.stm32duino.co

--- End quote ---

Laksen:
Assuming you are on a newer Linux, do you have the systemd ModemManager service disabled? That will often send garbage to any serial device when it shows up in the hope that it's an oldschool modem

To my knowledge it takes a bit of work to overwrite the system bootloader accessed by BOOT0, but you didn't write what STM32 device you are using?

I got too annoyed by the official ST tool being too unstable that I wrote my own bootloader flashing tool here: https://github.com/Laksen/stm32-bootloader

avra:

--- Quote from: petex on February 04, 2021, 09:13:43 pm ---Does this mean the card is bricked ?? How can I do a factory reset and completely wipe out the USB bootloader and resume the original serial link loader ??
--- End quote ---
Repeat the tutorial steps you followed when you have uploaded bootloader in the first place, but this time use blinky demo instead of bootloader. You would probably need to change one of the jumpers during the process.

MarkMLl:
How did you program it: with a specialist adapter? Did you use THE RIGHT loader? If that's a "Blue Pill" have you fitted an extra resistor to sort out the USB interface problem?

Those are the issues I've had in the past, but even with the extra pullup fitted I've found cheap "Blue Pills" somewhat erratic.

Why do you give a Linux-based example sith sudo and then start talking about a virtual com port?

MarkMLl

MiR:
I do not use Bluepills on a regular basis but when SWD does not work the safe haven for me was always serial upload, the routines are in ROM so you cannot break them in any way.

To do so:

Set Boot0 Switch to '1' Position, Boot1 Switch (if available) stays on '0'

Then connect serial uart to PA9 and PA10

Fire up latest STM32CubeProgrammer

Select UART mode
Select the COM Port of your usb-to-serial connector
Set speed to 115200 or 9600 8n1

hit reset

and hit connect

if it does not connect immediately then

hit reset on the board while connecting (do this while the app still searches for connectivity, so be rather fast)

then you can erase flash and all is back to normal.

I'd recommend flasing an uf2 bootlader, much more intuitive if you do not to use a swd debugger (in that case I'd rater use no bootloader at all)

Remember to switch back BOOT0 to 0 after chip erase

Navigation

[0] Message Index

[#] Next page

Go to full version