vdudouyt / stm8flash

program your stm8 devices with SWIM/stlinkv(1,2)
GNU General Public License v2.0
402 stars 182 forks source link

No success flashing STM8L001J3 #91

Open TG9541 opened 6 years ago

TG9541 commented 6 years ago

I tried flashing the STM8L001J3 with binary contained in vdudouyt/stm8flash 3e034d3 (master, Dec 13, 2017). Flashing the device doesn't work for unknown reasons. I tried using the "-d slow" option to no avail. Setting the option bits, however, works. Note that the device doesn't have a NRST pin.

Note: I had a look at the code (which doesn't compile for me), and found that stm8flash doesn't cluster technical information about STM8 variants into family and density. It simply uses the marketing name, and leaves QA to the user (the list in README.md).

Also note that I published information, derived from the STM8CubeMX db/mcu folder, on hypothetical common silicon properties in the Wiki of my fork of this repository.

TG9541 commented 6 years ago

I did some research:

I added a log facility to my local copy of STM8FLASH, and made it write an interaction trace. It fails whenever I use stlink2_wait_until_transfer_completes(). In block mode it didn't write any data. However, a test with writing Flash data in byte mode wrote the first 4 bytes to my STM8L001J3 chip.

icraftcrafts commented 6 years ago

hi.i just tried the raw chip. it seems to flash when power and programmer power are present. its possibly to do with the delay that needs to be there with the circuit power before the programmer uses swim. this definitely works on stm8flash. ive created a win vm with cosmic ​and got an error in there that led me to try this.