AnsweredAssumed Answered

Flash programming FLASH_CR_PER bit not clearing

Question asked by frackers on May 26, 2016
Latest reply on May 31, 2016 by frackers
When I try to program flash, I can erase it OK and at the end of erasing I clear the FLASH_CR_PER bit in the FLASH->CR register.
When I come to program a pair of half words, I get no errors (FLASH_SR_WRPERR and FLASH_SR_PGPERR clear, FLASH_SR_BSY clear) and FLASH_SR_EOP is set which I clear but the flash memory stays at 0xffffffff. 
At the point of failing the verify I have checked and see that the FLASH_CR_PER bit is set again despite clearing it after the page erase.
I'm not using the HAL code directly as I'm rewriting the whole of flash (hence I'm RAM resident) and I've fixed the HAL bug that tries to clear FLASH_SR_EOP bit whereas the spec says to write a '1' to that bit to clear it but still no write :(

Anyone any ideas?

Outcomes