2008-11-26 07:23 AM
Option byte progamming
2011-05-17 03:54 AM
I've tried to program option bytes(read-out unprotect and write protect) debbugging wiht J-Link(Segger). I used the library from UM0427 and I managed to erase these bytes, however when I tried to write in it I got a Hard Fault.
My code(flash library) is executing from RAM, and I believe the Fault cause is Option bytes address(0x1FFF F800...) which is probably unknown to mcu. Is that correct? How can I solve this? Just to showing: FLASH->OPTKEYR = FLASH_KEY1; FLASH->OPTKEYR = FLASH_KEY2; FLASH->CR |= CR_OPTER_Set; FLASH->CR |= CR_STRT_Set; status = FLASH_WaitForLastOperation(EraseTimeout); if(status == FLASH_COMPLETE) { FLASH->CR &= CR_OPTER_Reset; FLASH->CR |= CR_OPTPG_Set; OB->RDP= RDP_Key; After this point I get a Hard FaultThanks!