Question
Problem with flash programming (SWIM) and memory protection
Posted on November 27, 2016 at 13:53
Hi!
I'm trying to implement a SWIM programmer using only the datasheets, for an STM8S003F3. I have got the basics working (swim entry, rotf, wotf, srst). An I've been trying to figure out how to actually program the flash. I can write MASS key to FLASH_PUKR and can verify that PUL is set. I can verify FLASH_FPR is unset. As far as I can tell, issuing wotf commands to the flash memory region (0x8000-0x9FFF) should be all that is required, but doing so only sets WR_PG_DIS in FLASH_IASPR, indicating that memory is protected. What am I missing here? Thanks in advance! //Mats #swim-wr_pg_dis-flash-stm8