cancel
Showing results for 
Search instead for 
Did you mean: 

STM8S005K6 SWIM PROG error [42004]: Memory write error

LGeor.2
Associate II

Program memory write stopped working for me. I tried with two STM8S005K6 chips. And everything works fine if I use some other STM8 chip.

Getting below error when trying using STVP.

Error : Programming failed

Error : Problem while trying to Reset swim and device. Apply a Power On Reset

Error : < PROGRAM MEMORY programming failed.

And below error when trying through IAR compiler.

Sun Apr 04, 2021 14:16:28: Failed to write chunk with size 1024 at address 0x8480: SWIM PROG error [42004]: Memory write error 

DATA MEMORY and OPTION BYTE write is working perfectly. PROGRAM MEMORY read is working but NOT WRITE.

10 REPLIES 10
Kolab
Senior

I have been facing a similar issue on STM8S003F3 using STLINK V2. Failed to write chunk with size 128 at address 0x8000: SWIM PROG error [42004]: Memory write error.

Failed to load debugee: ...\new_project.out . I have to plug over and over again for it to work. I really thing that the problem could be with the STLINK , but not sure.