tinfever / FU-Dyson-BMS

(Unofficial) Firmware Upgrade for Dyson V6/V7 Vacuum Battery Management System
Other
649 stars 72 forks source link

Possible to flash using a Flipper Zero? #37

Open zhast opened 10 months ago

zhast commented 10 months ago

Hello, I do not have a PICkit but I did a little digging and I found that the flipper can emulate JTAG or SWD protocols with its GPIO pins and execute using openocd instead of the Microchip software. One sample of flashing a binary looks like this:

openocd -f interface/cmsis-dap.cfg -c "cmsis_dap_backend usb_bulk" -f debug/stm32wbx.cfg -c init -c "program build/latest/firmware.bin reset exit 0x8000000"

However, to make this work with the Dyson battery, we'd need a configuration for the microcontroller. Do you know which microcontroller the battery pack uses? And which memory address to write to (to replace 0x8000000)?

Let me know if there is anything else I'm missing. Thanks.

tinfever commented 10 months ago

The microcontroller is a PIC16LF1847, which isn't ARM based so I'm not sure if openOCD can work on it. All of the info on the hardware is in the hardware-info folder: https://github.com/tinfever/FU-Dyson-BMS/tree/main/hardware-info

There might have been some work done elsewhere on the internet to program a PIC using an Arduino but I'm not familiar with it.

Hope this helps.