AnsweredAssumed Answered

STM32L0 RDP

Question asked by Wizz on Apr 10, 2016
Latest reply on Apr 13, 2016 by Wizz
Hi all
I'm setting the read out protection to level 1 , in the beginning of my main() fxn
After setting RDP I generate system reset using HAL_NVIC_SystemReset() fxn

After the reset I'd expect the RDP to be set to level 1 but it's not
only a hard reset enables the RDP.

FLASH_OBProgramInitTypeDef pOBInit;

HAL_FLASH_OB_Unlock();
HAL_FLASHEx_OBGetConfig(&pOBInit);
if (pOBInit.RDPLevel != OB_RDP_LEVEL_1)
{
     pOBInit.RDPLevel = OB_RDP_LEVEL_1;
     HAL_FLASHEx_OBProgram(&pOBInit);
     HAL_FLASH_OB_Lock();
     Delay1ms(10000);
     HAL_NVIC_SystemReset();
}

 


Outcomes