Options bytes in STM32H73x: How do I apply them all from STM32CubeProgrammer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-09-13 7: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
- Labels:
-
STM32CubeProgrammer
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-09-20 9: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-09-20 1:50 PM
The tool shows that the connection fails because, when the RDP is set, the SWD is disabled.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-09-23 7: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-09-23 8: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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-09-23 9:04 AM
Hello again @Kayas Ahmed
Here are the steps to activate PCROP, WRP, Security bit, Secure Area and RDP:
- Check DMEP
- Check Security (under User Configuration)
- Uncheck nWRP0, nWRP1 or whatever needed
- Click Apply
- Check DMES (under Secure Protection)
- Set RDP value to BB
- Click Apply
Now, in order to deactivate these features PCROP, WRP, Security bit, Secure Area and RDP, you follow these steps:
- You need to uncheck DMEP, Security bit, DMES, check nWRPx also set RDP value to AA at the same time then click APPLY
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-09-26 1:45 PM
@Kayas Ahmed Do you have problem connecting with debugger after activation of secure area?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2022-09-26 2: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
