Flashing firmware with st-link after failed upload [SOLVED]
- mane2
- Posts: 177
- Joined: Fri Jan 13, 2023 6:32 am
- Location: Finland
- Has thanked: 20 times
- Been thanked: 8 times
Flashing firmware with st-link after failed upload
I recently uploaded binary with web interface to my Tesla SDU, and stm32 board stopped responding. Now I pulled the board out of the motor and got st-link v2 in my hand. I did not find any instructions how to do this for Small DU logic board V4. I need to find where to connect those swdio, swclk, 3.3v and gnd wires. Here’s how the board looks. Also, should I flash boot loader too, or just the stm32-sine.hex ?
- johu
- Site Admin
- Posts: 5789
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1023 times
- Contact:
Re: Flashing firmware with st-link after failed upload
Didn't your ST Link come with a straight through cable?
On the top row (i.e. where the notch is) pin 4 is SWDIO and pin 5 is SWCLK
You only need to flash the firmware, not the boot loader.
On the top row (i.e. where the notch is) pin 4 is SWDIO and pin 5 is SWCLK
You only need to flash the firmware, not the boot loader.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- mane2
- Posts: 177
- Joined: Fri Jan 13, 2023 6:32 am
- Location: Finland
- Has thanked: 20 times
- Been thanked: 8 times
Re: Flashing firmware with st-link after failed upload
Thanks. Yes. ST-link came with 4 straight through cables.
How about 3.3v and ground? Where to plug those leads?
How about 3.3v and ground? Where to plug those leads?
- mane2
- Posts: 177
- Joined: Fri Jan 13, 2023 6:32 am
- Location: Finland
- Has thanked: 20 times
- Been thanked: 8 times
Re: Flashing firmware with st-link after failed upload
Found this schematic for SDU V4, but now I'm bit confused. You said top row, but notch is on the bottom and schematics show that lower row pins from left 4 & 5 have same numbers 46 & 49 as that SWPROG port above in pic.
Can you confirm that the pic is correct where I drawed the pins?
Other question is, do I need to supply 3.3v and ground when I have 12v power supply anyways? Or which power supply should I use?
Can you confirm that the pic is correct where I drawed the pins?
Other question is, do I need to supply 3.3v and ground when I have 12v power supply anyways? Or which power supply should I use?
-
- Posts: 211
- Joined: Sun Feb 20, 2022 4:23 am
- Location: N. Wiltshire. UK
- Has thanked: 16 times
- Been thanked: 101 times
Re: Flashing firmware with st-link after failed upload [SOLVED]
This is not a very good schematic as a label has been added for TMS_46 and TMS_49 that does not match the net name so it's not obvious they are connected to swdat and swclk.
- mane2
- Posts: 177
- Joined: Fri Jan 13, 2023 6:32 am
- Location: Finland
- Has thanked: 20 times
- Been thanked: 8 times
Re: Flashing firmware with st-link after failed upload
Thanks for the info on 12v, 3.3v and ground! I guess I can choose, use either 3.3v or 12v, both will work?
Ah, my bad with picture. Of course that way! Thanks for correcting!
Agree with the schematic labels. Needs some guesswork
Ah, my bad with picture. Of course that way! Thanks for correcting!
Agree with the schematic labels. Needs some guesswork
- mane2
- Posts: 177
- Joined: Fri Jan 13, 2023 6:32 am
- Location: Finland
- Has thanked: 20 times
- Been thanked: 8 times
Re: Flashing firmware with st-link after failed upload
Got it flashed! Thanks for your help.
While it was open, also tried to make a stm32-sine build using Debian running on Windows WSL. Got that uploaded via web-interface and that worked too. So all good now!
While it was open, also tried to make a stm32-sine build using Debian running on Windows WSL. Got that uploaded via web-interface and that worked too. So all good now!
- johu
- Site Admin
- Posts: 5789
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 157 times
- Been thanked: 1023 times
- Contact:
Re: Flashing firmware with st-link after failed upload
Great
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9