Option byte progamming
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2008-11-26 7:23 AM
Posted on November 26, 2008 at 16:23
Option byte progamming
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2011-05-17 3:54 AM
Posted on May 17, 2011 at 12:54
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!