2022-09-13 07:24 AM
Hello,
I am having trouble applying all the option bytes from STM32CubeProgrammer.
I have ported the SBSFU example to use it as a bootloader, I am at the stage where I would test all the security settings by configuring the option bytes externally.
From my testing, I am able to set PCROP, WRP, and Secure memory but when I try to set RDP which I think should be configured at the end, It fails.
Can someone please tell me the proper sequence of option bytes configuration?
Looking forward to a positive response
Thanks,
Kayas Ahmed
2022-09-20 09:37 AM
Hi @Kayas Ahmed
Could you please share a screenshot of STM32CubeProgrammer showing the issue you are facing?
If possible to add the steps you follow, this would be helpful.
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.
2022-09-20 01:50 PM
The tool shows that the connection fails because, when the RDP is set, the SWD is disabled.
2022-09-20 11:57 PM
Hello @F.Belaid ,
Please find the screenshot attached,
The sequence of option bytes configuration is shown below,
PCROP, WRP, and Security bit -> Secure Area and RDP
or
PCROP, WRP, and Security bit -> Secure Area -> RDP
Both sequences would give me the same error as attached,
Thanks,
Kayas Ahmed
2022-09-23 07:55 AM
Hi @Kayas Ahmed
I made similar test using STM32H750B-DK, and it's working as expected.
STM32CubeProgrammer v2.11.0 is used on my side.
Could you please precise your environment (exact device + STM32CubeProgrammer Version) ?
You need to pay attention when trying to do an RDP regression from level1 to level0:
All Option Bytes have to be updated at the same time.
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.
2022-09-23 08:02 AM
Hi @F.Belaid ,
May I know the sequence you set the option bytes?
I am also using STM32CubeProgrammer v2.11.0, and my device is STM32H735.
Thanks & Regards,
Kayas Ahmed
2022-09-23 09:04 AM
Hello again @Kayas Ahmed
Here are the steps to activate PCROP, WRP, Security bit, Secure Area and RDP:
Now, in order to deactivate these features PCROP, WRP, Security bit, Secure Area and RDP, you follow these steps:
Note : In case you are deactivating, and you don't follow the correct sequence, You should start by enabling level 1 protection then you follow the process (you need to step back to restore the protection so that you can start the regression)
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.
2022-09-26 12:13 AM
Hello @F.Belaid ,
Thank you for the explanation.
I tried the sequence that you listed, but It didn't work. I noticed that you are not setting the secure area, which is causing the issue (enables secure mode boot).
Thanks,
Kayas Ahmed
2022-09-26 01:45 PM
@Kayas Ahmed Do you have problem connecting with debugger after activation of secure area?
2022-09-26 02:40 PM
Hi @Pavel A.
No, I don't have a problem connecting to the debugger as I have enabled JTAG in the code (as it is disabled in secure mode).
I want to make a few things clear
1) What I am trying to achieve is to enable all the options bytes from the debugger
2) When the secure area is enabled, RDP (from the debugger) set fails when in the bootloader (secure area), Only can be set after jumping out of the secure memory area, in my case jumping to the application (from the bootloader). This works and I have tried it many times. Note: JTAG is connected in hotplug mode
3) My intention is not to boot the application without setting all the option bytes.
So I want the procedure to do so if at all it is possible.
Thanks & Regards,
Kayas Ahmed