2013-07-23 07:46 AM
Hi ,
I enable write protection for Sector 8 , which set my option byte to 0x0EFFAAED as i can read from debugger ( IAR ). but as soon as i restart my debugger again i found read protection set to level 1 . i.e value of option byte turns to 0x0EFFFFED. I am not touching RDP byte anywhere from my code. No power fluctutaion and no ESD discharge . Is there any other way that RDP turn to level 1 without explictly writing on RDP option byte ?? regards,2013-07-23 02:30 PM
in theory, I beleive this is not possible. I think there is a mix between our devices series F1 options and F2 or F4 series in the way the options bytes are written, can you share your code and which MCU series are used to understand the case.
Cheers, STOne-322013-07-24 01:39 AM
Please find prototype of code , MCU and sequence of event -
init()
{Write_pro( FALSE);
//Some work
Write_pro(TRUE)
}
write_pro(bool write_protect)
{FLASH_OB_Unlock();
if (write_protect==TRUE) { FLASH_OB_WRPConfig(OB_WRP_Sector_8 , ENABLE); } else { FLASH_OB_WRPConfig(OB_WRP_Sector_8 , DISABLE); } FLASH_OB_Launch(); FLASH_OB_Lock();}
IAR workbench with ijet , STM3220G-EVALEvaluation board for STM32 F2 series - with STM32F207IG MCU
Sequence of Event -
1) Download image and run 2) It runs fine and set option byte to 0x0EFFAAED 3) Restart the debugger with the same image i.e debug without download option. 4) Read option byte get set to level 1 with value FF . and CPU Status in debugger is LOCK-UP.2013-07-24 02:28 AM
2013-07-29 12:39 AM
Hi STOne-32,
Do you have any idea/advice about this problem ?? Regards, Ruchika