cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H523RCT6 READ OUT PROTECTION LEVEL1

DeepakKumar
Associate II

Hi ST Team,

                   Currently i am using STM32H523RCT6 mcu for one of my project. 
In this i want to set the read out protection of level 1. 

Currently i am using below sequence to set the read out protection of level 1 protection..

    // Unlock the flash option bytes
    HAL_FLASH_Unlock();
 
    // Set the read out protection level to Level 1
    // RDP Level 1 is indicated by the value 0x01
    uint32_t option_bytes = 0x01; // RDP Level 1
    HAL_FLASH_OB_Unlock();
    
    // Program the option byte
    HAL_FLASHEx_OBProgram(&option_bytes);
 
    // Start the option byte change
    //HAL_FLASH_OB_Launch();
 
    // Lock the option bytes
    HAL_FLASH_OB_Lock();
 
    // Lock the flash memory
    HAL_FLASH_Lock();
 
HAL_FLASH_OB_Launch();
 
but this is not working.....
So can you please send me a sample code or routine to set the read out protection of level 1.
 

Thanks with Regards,

DEEPAK

1 REPLY 1
Imen.D
ST Employee

Hello @DeepakKumar ,

There is a "Product State" feature available on STM32H5 which functions similar to the readout protection (RDP) feature.

Please refer to these articles :

This workshop video presents the new mechanism of readout protection introduced in STM32H5: 

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen