2023-08-30 01:51 AM - edited 2023-08-30 02:04 AM
Hi,
I am trying to run my application on the STM32L433RTCX which includes the code that enables the RDP to level 1. Even after multiple different attempts (to set it at level 1) the application on the MCU is still not working. Details from my side -
HAL_StatusTypeDef SetRDPLevel1()
{
FLASH_OBProgramInitTypeDef OB;
HAL_FLASHEx_OBGetConfig(&OB);
if (OB.RDPLevel != OB_RDP_LEVEL_1){
HAL_FLASH_Unlock();
HAL_FLASH_OB_Unlock();
OB.OptionType = OPTIONBYTE_RDP;
OB.RDPLevel = OB_RDP_LEVEL_1;
if ( HAL_FLASHEx_OBProgram(&OB) != HAL_OK ){
HAL_FLASH_OB_Lock();
HAL_FLASH_Lock();
return HAL_ERROR;
}
HAL_FLASH_OB_Launch();
/* We should not make it past the Launch, so lock
* flash memory and return an error from function
*/
HAL_FLASH_OB_Lock();
HAL_FLASH_Lock();
return HAL_ERROR;
}
return HAL_OK;
}
Solved! Go to Solution.
2023-08-30 03:55 AM
Hello @Abhishek_S
Here are some suggestions that might help:
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-08-30 03:55 AM
Hello @Abhishek_S
Here are some suggestions that might help:
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-08-30 10:47 PM
Hi,
The cube programmer worked for me. But I am unable to understand what I missed while programming this in code. I was aware about the reset while I received while debugging OBL_LAUNCH, however, after reset (reload of the option bytes which also worked properly i.e. level 1 was enabled) the device just seemed to not function. Is it something like that I lost my bootloader or somekind of silly mishap?