cancel
Showing results for 
Search instead for 
Did you mean: 

How to process RDP regression from appplication code?

Aurelien1
Associate III

Hi,

for my application I need to set RDP regression from my application code :

1) Is it possible in RDP2 to provide OEM Key (for regression) from application code in order to restore JTAG access (and perform a regression whith a user intervention)

2) Is it possible to do RDP 2 => RDP 1 from application code (using DBGMCU_DBG_AUTH_DEVICE or other way) ? if yes what is the correct process

3) is it possible to go from RDP 1 to RDP 0 or RDP 0_5?

for this part I try the following code without success (no error but no RDP Regression)

 FLASH_OBProgramInitTypeDef obConfig = {0};

 HAL_FLASH_Unlock();

 HAL_FLASH_OB_Unlock();

 obConfig.RDPKey1 = 0x11111111;

 obConfig.RDPKey2 = 0x11111111;

 obConfig.RDPKeyType = OB_RDP_KEY_OEM1;

 obConfig.OptionType = OPTIONBYTE_RDPKEY;

 HAL_FLASHEx_OBProgram(&obConfig);

 obConfig.RDPLevel= OB_RDP_LEVEL_0_5;

 obConfig.OptionType = OPTIONBYTE_RDP;

 HAL_FLASHEx_OBProgram(&obConfig);

 obConfig.RDPLevel= OB_RDP_LEVEL_0_5;

 obConfig.OptionType = OPTIONBYTE_RDP;

 HAL_FLASHEx_OBProgram(&obConfig);

 HAL_FLASH_OB_Launch();

Should I use HAL_FLASH_OB_Launch() twice ?(I will use external memory to store prvious command)

Thanks for your help

1 ACCEPTED SOLUTION

Accepted Solutions
Jacob WOODRUFF
ST Employee

Hi Aurelien,

This thread was flagged for a case creation by one of our community moderators but I see that a case has already been created and closed from our direct support team.

For the benefit of everyone else that may have similar issues, the expertise from our team is given below:

"

RDP regression ( in legacy mode ) is possible from embedded software.

But in your code, you try to provision the OEM1 key then do a regression.

The rule about key provisioning is explained in this video:

https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-moocs/stm32u5-rdp.html

https://www.youtube.com/watch?v=9Im5h5hJACM&list=PLnMKNibPkDnEkeKd_fytwc_9x2Ht2gRUn&index=2

at 6.20

"

Regards,

Jake

ST Support

View solution in original post

4 REPLIES 4

Isn't RDP=2 PERMANENT ?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Aurelien1
Associate III

Not in my case . I don't lock RDP_2 (OEM2LOCK = 1) to allow RDP regression using OEM Key.

Aurelien1
Associate III

Does it is possible to access to DBGMCU_DBG_AUTH_HOST from application code?

I see that this register is not inside the HAL

Jacob WOODRUFF
ST Employee

Hi Aurelien,

This thread was flagged for a case creation by one of our community moderators but I see that a case has already been created and closed from our direct support team.

For the benefit of everyone else that may have similar issues, the expertise from our team is given below:

"

RDP regression ( in legacy mode ) is possible from embedded software.

But in your code, you try to provision the OEM1 key then do a regression.

The rule about key provisioning is explained in this video:

https://www.st.com/content/st_com/en/support/learning/stm32-education/stm32-moocs/stm32u5-rdp.html

https://www.youtube.com/watch?v=9Im5h5hJACM&list=PLnMKNibPkDnEkeKd_fytwc_9x2Ht2gRUn&index=2

at 6.20

"

Regards,

Jake

ST Support