emmebrusa / TSDZ2-Smart-EBike-860C

TSDZ2 Open Source Firmware adapted to 860C display
GNU General Public License v3.0
43 stars 12 forks source link

Error while flashing: SWIM error 0x04 #3

Closed elishowk closed 2 years ago

elishowk commented 2 years ago

Hi,

Thanks for the work on this firmware. I'm new to this whole subject and I unable to flash the latest firmware following the instructions here.

Here's me logs:

sudo stm8flash -c stlinkv2 -p 'stm8s105?6' -w TSDZ2-v20.1C.3-860C-NEW.hex
Determine FLASH area
STLink: v2, JTAG: v17, SWIM: v4, VID: 8304, PID: 4837
Due to its file extension (or lack thereof), "TSDZ2-v20.1C.3-860C-NEW.hex" is considered as INTEL HEX format!
24029 bytes at 0x8000... SWIM error 0x04

I also tried without success to convert the original HEX file to Raw binary. I have stm8flash cloned from the latest commit on master. The battery is fully charged and connected, and the 860C is already flashed with the same v20.1C3 version (and is ON while flashing).

I can't find information on the internet about the "swim error 0x04". Could you help me please ?

casperskodt1991 commented 2 years ago

Hi, I flashed this with success. I did it without power connected to the motor. The STlink is able to power the CPU for programming.