2021-05-17 08:08 AM
Hello,
I am trying to change RDP level in my own project with STM32H753 micro but without succcess.
No problem if I use the STM32 Cube Programmer but with my own fw I have error in HAL_FLASHEx_OBProgram() function.
In this function the error occurs in FLASH_WaitForLastOperation().
This is my part of code to change RDP level.
HAL_FLASHEx_OBGetConfig(&OBInit);
HAL_FLASH_OB_Unlock();
HAL_FLASH_Unlock();
OBInit.OptionType = OPTIONBYTE_RDP;
OBInit.RDPLevel = OB_RDP_LEVEL_1;
err = HAL_FLASHEx_OBProgram(&OBInit);
if (err == HAL_OK)
{
HAL_FLASH_OB_Launch();
HAL_FLASH_OB_Lock();
HAL_FLASH_Lock();
return (HAL_OK);
}
else
{
return (HAL_ERROR);
}
May you help me please?
Thank you in advance
Fabio
2021-05-24 08:01 AM
no suggrstions?