Page 1 of 1

'Bricked' LDU Inverter trying to load new firmware  [SOLVED]

Posted: Sat Apr 23, 2022 11:38 am
by Boxster EV
Folks,

I've been hesitant to upgrade my firmware for fear of exactly this happening. Anyhow, I hit upload and the progress bar then says upload complete immediately, but clearly nothing has happened.

192.168.4.1/list yields the below. Is my issue one of memory in the wifi module? Can someone please help explain a layman's solution to fix this without having to pull the drive unit again? I've read through viewtopic.php?f=5&t=1756 thread but it might as well be in another language.

Thank you!

Code: Select all

[{"type":"file","name":"stm32_sine (6).bin"},{"type":"file","name":"index.js"},{"type":"file","name":"inverter.js"},{"type":"file","name":"jquery.knob.min.js.gz"},{"type":"file","name":"LDU_fweak_only (1).bin"},{"type":"file","name":"src/arm_debug.h"},{"type":"file","name":"src/arm_reg.h"},{"type":"file","name":"ajax-loader.gif"},{"type":"file","name":"wifi-updated.html"},{"type":"file","name":"wifi.html"},{"type":"file","name":"jquery.core.min.js.gz"},{"type":"file","name":"README.md"},{"type":"file","name":"refresh.png"},{"type":"file","name":"remote.html"},{"type":"file","name":"src/flashloader/stm32x.h"},{"type":"file","name":"src/arm_debug.cpp"},{"type":"file","name":"log.html"},{"type":"file","name":"log.js"},{"type":"file","name":"syncofs.html"},{"type":"file","name":"src/flashloader/LICENSE"},{"type":"file","name":"chartjs-annotation.min.js.gz"},{"type":"file","name":"stm32_sine (5).bin"},{"type":"file","name":"src/flashloader/linker.ld"},{"type":"file","name":"src/flashloader/Makefile"},{"type":"file","name":"src/flashloader/stm32f0.h"},{"type":"file","name":"src/flashloader/stm32f0.s"},{"type":"file","name":"gauge.min.js.gz"},{"type":"file","name":"gauges.html"},{"type":"file","name":"gauges.js"},{"type":"file","name":"src/flashloader/stm32x.s"},{"type":"file","name":"src/LICENSE"},{"type":"file","name":"style.css"},{"type":"file","name":"chart.min.js.gz"},{"type":"file","name":"stm32_sine (4).bin"},{"type":"file","name":"index.html"},{"type":"file","name":"LDU_fweak_only.bin"}]

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Sat Apr 23, 2022 12:07 pm
by jon volk
You do have some extra .bin files so deleting those would be a good place to start. Unfortunately I was never able to recover mine over WiFi. This was my backup fix for future issues. Runs the swd connections out to two unused pins. Backfeed 5v to power the board through the tps 5v supply pin.
6B6DCD6F-FF56-41C3-ABA1-B81D809AF67B.jpeg
FAC4A25C-FD92-469B-B1DA-835DFB902C2C.png
FAC4A25C-FD92-469B-B1DA-835DFB902C2C.png (282.9 KiB) Viewed 5405 times

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Sat Apr 23, 2022 12:09 pm
by Boxster EV
jon volk wrote: Sat Apr 23, 2022 12:07 pm You do have some extra .bin files so deleting those would be a good place to start. Unfortunately I was never able to recover mine over WiFi. This was my backup fix for future issues. Rams the swd connections out to two unused pins. Backfeed 5v to power the board through the tps 5v supply pin.

6B6DCD6F-FF56-41C3-ABA1-B81D809AF67B.jpegFAC4A25C-FD92-469B-B1DA-835DFB902C2C.png
Thanks and nice solution. How would one go about deleting the .bin files?

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Sat Apr 23, 2022 12:12 pm
by jon volk
This is what I followed
viewtopic.php?f=5&t=1756

EDIT:just saw that’s the thread you found.

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Sat Apr 23, 2022 1:32 pm
by Boxster EV
I re-read the thread and managed to delete the superfluous stuff from the esp

Unfortunately, the upload firmware function still doesn't work.

Any more suggestions before I start the painful road of pulling the DU again?

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Sat Apr 23, 2022 1:49 pm
by catphish
jon volk wrote: Sat Apr 23, 2022 12:07 pm Runs the swd connections out to two unused pins.
Did you make that PCB? I need something very similar to patch a STM32 programmer into my SDU loom.

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Sat Apr 23, 2022 1:54 pm
by jon volk
catphish wrote: Sat Apr 23, 2022 1:49 pm
jon volk wrote: Sat Apr 23, 2022 12:07 pm Runs the swd connections out to two unused pins.
Did you make that PCB? I need something very similar to patch a STM32 programmer into my SDU loom.
I did the mods but it’s one of Damien’s from 3 or 4 years ago. I do have plans for a redo on my own but have limited motivation given other projects of higher priority. I just depopulated two resistors and jumped the swd signals to the sides that had connections to the outside world.

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Sat Apr 23, 2022 1:56 pm
by catphish
jon volk wrote: Sat Apr 23, 2022 1:54 pm I did the mods but it’s one of Damien’s from 3 or 4 years ago. I do have plans for a redo on my own but have limited motivation given other projects of higher priority. I just depopulated two resistors and jumped the swd signals to the sides that had connections to the outside world.
Sorry - I meant the purple one, with the ST-Link attached to it.

I did the same hack on my SDU - it's quite easy there:
PXL_20220404_103408622.jpg

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Sat Apr 23, 2022 2:01 pm
by jon volk
Ahh yea sorry,I did. I think I have extras. I’ll need to check if I didn’t toss them.

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Sat Apr 23, 2022 2:09 pm
by catphish
jon volk wrote: Sat Apr 23, 2022 2:01 pm Ahh yea sorry,I did. I think I have extras. I’ll need to check if I didn’t toss them.
Thanks - would be a super neat way to hook it up!

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Mon Apr 25, 2022 1:34 pm
by P.S.Mangelsdorf
When mine bricked, if I remember correctly I was able to use the reset button on the board while powering up to get it unbricked, I think. (it was 8 very long months ago). It was a bit tricky to connect the 12V harness with the case off the inverter, but I got it to work.

Over in either the Web Interface or Firmware sections of the forum are the instructions on using Curl to delete the previous versions. Something I learned when I did that recently: Windows 10 and up already includes Curl, no need to download.

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Mon Apr 25, 2022 4:52 pm
by johu
There shouldn't be any files in subdirectories (not the subdirs are the problem but the redundant files). Seems files in /src got uploaded as well. You can also try to rewrite the SPIFS via wifi with Arduino. I've had to do that once when my module accepted no files anymore despite sufficient space left.

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Tue Apr 26, 2022 10:20 am
by Boxster EV
johu wrote: Mon Apr 25, 2022 4:52 pm There shouldn't be any files in subdirectories (not the subdirs are the problem but the redundant files). Seems files in /src got uploaded as well. You can also try to rewrite the SPIFS via wifi with Arduino. I've had to do that once when my module accepted no files anymore despite sufficient space left.

Thanks. I’ve no idea how/why those files ended up on the esp.

I intend to start fresh with both stm32 on logic board and esp.

In terms of flashing the logic board with st-link, can you confirm that I should be doing the following one after the other:

Stm32_bootupdater.bin
Stm32_loader.bin
Stm32_sine.bin

Thanks in advance

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Tue Apr 26, 2022 11:39 am
by johu
Not the stm32_bootupdater! That's for “in situ“ update of the bootloader
I also recommend the hex files because they have flash addresses included

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Tue Apr 26, 2022 6:59 pm
by Boxster EV
johu wrote: Tue Apr 26, 2022 11:39 am Not the stm32_bootupdater! That's for “in situ“ update of the bootloader
I also recommend the hex files because they have flash addresses included
Thank you, Johannes. Used ST-Link to load the hex files (loader and sine) and the whole thing immediately came back to life. Just need to tidy up my wiring to have the hardwire connections coming out of the 23pin drive unit connector in case of future issues.

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Tue Apr 26, 2022 7:27 pm
by EV_Builder
Am i the only tinckerer to use CanBus for updates then?

Re: 'Bricked' LDU Inverter trying to load new firmware

Posted: Fri May 13, 2022 6:29 am
by Boxster EV
To prevent this from happening again, I made a direct connection to the ST programming pins that can be accessed (fished out) where the LDU HV terminals are accessed (by removing the plastic orange cover). It’s a bit of a hack and 5v still needs to be sent through the 23pin connector but works.

No more holding my breath whilst doing a firmware update.
0458B0F2-0475-4E5B-B13D-3EE5DFA9321D.jpeg