Spontaneous setting of RDP 1 after reset when saving option bytes
Board: Nucleo-f756ZG and Nucleo-F767ZI
When i reset quickly board using reset button during execute below code, The board set RDP protection Level 1.
Below code contains only rootcause. I know that is not correct usage (missing OB lock, wait for busy flag etc) but i have an application that using
FLASH->OPTCR |= FLASH_OPTCR_OPTSTRT
and after quick
reset
few times, the application freezed (like after changed RDP). I checked the board using STM32CubeProgrammer and the board have set RDP level 1 after this case.
Larger gaps (above 1 second) between resets do not cause this problem.
My code:
int main(void)
{
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* Configure the system clock */
SystemClock_Config();
BSP_LED_Init(LED_GREEN);
BSP_LED_On(LED_GREEN);
HAL_FLASH_OB_Unlock();
FLASH->OPTCR |= FLASH_OPTCR_OPTSTRT;
while (1)
{}
}
I also created issue on github F7:
