How to process RDP regression from appplication code?
Hi,
for my application I need to set RDP regression from my application code :
1) Is it possible in RDP2 to provide OEM Key (for regression) from application code in order to restore JTAG access (and perform a regression whith a user intervention)
2) Is it possible to do RDP 2 => RDP 1 from application code (using DBGMCU_DBG_AUTH_DEVICE or other way) ? if yes what is the correct process
3) is it possible to go from RDP 1 to RDP 0 or RDP 0_5?
for this part I try the following code without success (no error but no RDP Regression)
FLASH_OBProgramInitTypeDef obConfig = {0};
HAL_FLASH_Unlock();
HAL_FLASH_OB_Unlock();
obConfig.RDPKey1 = 0x11111111;
obConfig.RDPKey2 = 0x11111111;
obConfig.RDPKeyType = OB_RDP_KEY_OEM1;
obConfig.OptionType = OPTIONBYTE_RDPKEY;
HAL_FLASHEx_OBProgram(&obConfig);
obConfig.RDPLevel= OB_RDP_LEVEL_0_5;
obConfig.OptionType = OPTIONBYTE_RDP;
HAL_FLASHEx_OBProgram(&obConfig);
obConfig.RDPLevel= OB_RDP_LEVEL_0_5;
obConfig.OptionType = OPTIONBYTE_RDP;
HAL_FLASHEx_OBProgram(&obConfig);
HAL_FLASH_OB_Launch();
Should I use HAL_FLASH_OB_Launch() twice ?(I will use external memory to store prvious command)
Thanks for your help
