cancel
Showing results for 
Search instead for 
Did you mean: 

Program Execution Issue After Enabling RDP Level 1 on STM32H735

SHm
Associate II

Hello everyone,

I am experiencing an issue with my stm32H735 microcontroller after enabling RDP level 1. The program that was working perfectly (blinking led) under RDP level 0 no longer executes after I changed the protection level to 1.

What I have Tried: I activated RDP level 1 using 3 different methods, and the issue remains the same each time:

1 - using STM32_Programmer_CLI with the following command:

 

STM32_Programmer_CLI.exe -c port=COM7 br=115200 -rdu
STM32_Programmer_CLI.exe -c port=COM7 br=115200 -e all -w test.hex -ob RDP=0xBB -v

 

2 - Using the STM32CubeProgrammer GUI to set RDP level 1 after programming.

3 - through the program by adding this code:

 

  FLASH_OBProgramInitTypeDef RDP_init;
  HAL_FLASH_OB_Unlock();
  HAL_FLASH_Unlock();

  RDP_init.OptionType = OPTIONBYTE_RDP;
  RDP_init.RDPLevel = OB_RDP_LEVEL_1;
  HAL_FLASHEx_OBProgram(&RDP_init);
  HAL_FLASH_OB_Launch();

 

In all cases, the programming and verification are succesful, and RDP level 1 is activated without any errors. However, after enabling RDP level 1, the program does not execute anymore. The microcontrollers seems to be stuck or not running the application code.

Questions:

- Has anyone encountered similar issues after enabling RDP level 1?

- Are there specific considerations or configurations needed when moving from RDP level 0 to level 1?

Any guidance or suggestions would be greatly appreciated. Thank you in advance!

Best Regards,

Saif.

1 ACCEPTED SOLUTION

Accepted Solutions
Frantz LEFRERE
ST Employee

Hello @SHm 

the flash is probably locked as there is a debug connection in RDP 1. Try to deconnect the debuger and do a power cycle. If you are using an ST board with an embedded STLINK to power the abord insure to remove the mass storage option which could drive to an intrusion detection.
This issue is also explain in this viceo 
https://www.youtube.com/watch?v=f7vs0NwZPFo

Other related resource.
https://community.st.com/t5/stm32-mcus-products/stm32h7-rdp-without-por/m-p/581734#M220670 

Best regards,

Frantz 

View solution in original post

2 REPLIES 2
Frantz LEFRERE
ST Employee

Hello @SHm 

the flash is probably locked as there is a debug connection in RDP 1. Try to deconnect the debuger and do a power cycle. If you are using an ST board with an embedded STLINK to power the abord insure to remove the mass storage option which could drive to an intrusion detection.
This issue is also explain in this viceo 
https://www.youtube.com/watch?v=f7vs0NwZPFo

Other related resource.
https://community.st.com/t5/stm32-mcus-products/stm32h7-rdp-without-por/m-p/581734#M220670 

Best regards,

Frantz 

Hello,

Thank you so much for your advice; you were absolutely right!

I disconnected the STLINK debugger and powered the board through an external source, and the program executed correctly without any issues. It seems that the debug connection in RDP Level 1 was indeed locking the flash.

This resolved my problem, and I really appreciate your help and the resources you shared.

Thanks again to everyone who contributed. This was a great learning experience!

best regards,

Saif.