Skip to main content
gatadivijay
Associate II
September 23, 2024
Solved

STM32H5 RDP protection C code

  • September 23, 2024
  • 2 replies
  • 1842 views

Hi,

Currently I can able to RDP protection ie., Product state using STM32CubeProgrammer and it is working.

But our requirement is we want to use Any HAL_driver /C-code instead of STM32Cube.

 

Any suggestion.

 

Best answer by mƎALLEm

Hello @gatadivijay ,

But STM32CubeProgrammer supports also J-LINK:

SofLit_0-1730119502421.png

Did you try the same steps with this config?

 

2 replies

TDK
Super User
September 23, 2024

RDP is a hardware setting, not a HAL-specific setting. You can use it with whatever code you want.

If you don't want to use STM32CubeProgrammer or HAL functions to set the RDP, see the option byte section of the reference manual for the register interface needed to set RDP in code.

"If you feel a post has answered your question, please click ""Accept as Solution""."
gatadivijay
Associate II
September 23, 2024

No I want to use HAL_Specific drivers.

If you have any sample code regarding Product State, Please can you attach related HAL Driver Functions.

 

Technical Moderator
September 23, 2024

Hello @gatadivijay ,

The RDP is replaced by PRODUCT_STATE on STM32H5.

Please refer to this article : How to enable RDP-like product state flash protect... - STMicroelectronics Community

"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"
gatadivijay
Associate II
October 28, 2024

Thanks Imen.

But in our production set-up we are going to use Jlink.

Whatever you mentioned it is related to ST-Link.

 

Please can you explain how use PRODUCT_STATE when I use JLINK??

Please provide me Any script /code for this??

mƎALLEm
mƎALLEmBest answer
Technical Moderator
October 28, 2024

Hello @gatadivijay ,

But STM32CubeProgrammer supports also J-LINK:

SofLit_0-1730119502421.png

Did you try the same steps with this config?

 

"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."