Hi, yesterday I killed my bootloader. I flashed a Nokia 3310 LCD code example, it worked, then I wanted to test anoter one. There my board's bootloader got killed. I did everything as usual but something seems to have gone wrong. Anyways. I read that I have the option to reflash the bootloader via serial, but I don't have the right hardware for that. I also own a STM32VL-Discovery board, which has an ST-Link JTAG SWD debugger on board. Can I somehow use that to reflash the bootloader?
Thank you in advance.
Killed my Bootloader
(11 posts) (4 voices)-
Posted 3 years ago #
-
I think you can connect SWD from STM32VL-Discovery to your board and flash bootloader. To be more specific I need to know OS you're using and board (maple/mini/etc.) which you're going to reflash.
P.S. for this purpose I've assembled my own USB<->serial converter on CP2102 chip, but similar devices can be purchased at ebay for ~$3.
Posted 3 years ago # -
Thanks for the fast reply. Do you have some links to those devices?
As OS I have a Win7 64Bit machine, but XP 32Bit can be installed,too.
As hardware, I use an Olimexino. In Maple IDE I select Maple V3, which worked fine.
So, is the JTAG flashing of the bootloader described anywhere?Posted 3 years ago # -
You need to connect SWCLK, SWDIO and GND pins from ST-LINK at your Discovery board to appropriate pins at Olimexino (pins 4, 2 and 3 appropriately in SWD connector at board, according to documentation). Then you need to power up target and flash it using ST-LINK Utility GUI (or command line utility) which you can find at ST site. Binaries of bootloaders you can find here: http://leaflabs.com/docs/bootloader.html
Hope this helps.Posted 3 years ago # -
Thank you very much siy. Will check it later. Hope it works.
EDIT: Thank you. Worked fine. Removed both jumper on Discovery, soldered wires from SWD headers pin 4-2 and 2-4 (crosswisely connected) GND from anywhere on both devices connected aswell. Hooked up the Discovery and the Olimexino to the PC and flashed the bootloader using the utility.
Now I can go on Playing with my board...
Posted 3 years ago # -
I'm glad that it works now.
Posted 3 years ago # -
Well, unfortunately I am back. Seems like there is more wrong than I thougt.
I was able to flash the blink example, which worked fine. Later I was trying to flash another program.
It keeps hanging again, before the target gets flashed. So I reflashed the bootloader. But nothing happens. Always hangs at the exact same time. I also get an error message in the IDE. It's in German, but it says something like a device connected to the system is not working. Don't know what that means. When I connect the board to the PC, it recognizes it as a Maple 003 and the COM port is there, too.
Also, when I touch the STM chip, it's really warm. Can't put my finger on it for too long. The blink programm works though. ST Utility can connect to the target, and flash it. But I can't reflash the Olimexino in Maple IDE.
Is there a way to generate a .bin file withing Maple IDE? So I would be able to program in Maple IDE and flash with ST-Utility.Posted 3 years ago # -
cant speak too much for olimexino, but you may be able to use the onboard serial bootloader for reflashing. there is a note about this in the docs.
Also, a really warm chip is probably a bad sign...did you flash the wrong bootloader? kill regulator? drive a "0" into a "1" or vice versa with an OUTPUT?
Posted 3 years ago # -
Well, I am sure, that I didn't mess with an Output.
Yeah, the chip gets pretty warm, not to say hot. I can flash it though. I can tell, because using the ST-Link I can erase the chip-> Board does nothing at all.
I flash bootloader-> Board blinks as usual. But the the serial port doesn't appear, so I can't flash through maple ide.
Shouldn't flashing via SWD do the same thing as flashing via serial?
Is there a way to tell the IDE to create bin files instead? So I could test the board by flashing it with the stlink utility.EDIT: Just checked VOUT of both regulators.
3.3V each. Vin is 4.3V though(supply is usb socket of Laptop).Posted 3 years ago # -
When you erase the chip and then reset, does the chip get hot even with not running any code?
Flashing via the serial boot loader should do the same as flashing through JTAG or SWD.
If the LED is blinking and the serial port does not show up, try a different USB port or a different machine if you have one.
Regards,
MikePosted 3 years ago # -
Hi Mike,
yes, that's exactly what's happening. No code, hot mcu. Tried another machine with win 7, even installed xp yesterday. I don't get it working.Posted 3 years ago #
Reply
You must log in to post.