Skip to main content
Associate II
May 19, 2026
Question

Missing bootloader command

  • May 19, 2026
  • 8 replies
  • 167 views

The AN3156 explains on page 18 the Read Unprotect Command:

This command is selected when wValue = 0 and the first byte of the buffer sent by the host
is 0x92. The buffer length is only one (the command) byte.
The host sends a DFU_DNLOAD request with the above parameters to remove the read
protection of the internal flash memory.

 

It is very useful that you implemented a command to remove the read protection.
But this is useless if there is also a write protection active.
The user has no way to remove a write protection over the DFU protocol.

Why does this command not remove both: The read protection AND the write protection at the same time?
Why does STM implement nothing that allows to remove a write protection ?

8 replies

ST Technical Moderator
June 17, 2026

Hi ​@Elmue  @STOne-32 

Some comments have not been migrated to the new platform. 

An internal ticket is submitted to dedicated team to clarify scope of this read unprotect command. For internal reference CDM0062909 

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
ElmueAuthor
Associate II
June 18, 2026

What do you mean with “new platform” ?

Bob S
Super User
June 19, 2026

ST recently switched to new forums software (i.e. “platform”)

ElmueAuthor
Associate II
June 19, 2026

What is the new URL ?

Chris21
Associate II
June 19, 2026

URL is the same, you are now using the new platform.

.
ST Technical Moderator
August 31, 2026

Hi ​@Elmue  

Coming back to this topic with the clarification from our internal team :

  • Read protection RDP and write protection WRP are two distinct hardware features.
  • The Read Unprotect command only performs an RDP regression.
  • By design, RDP reset does not clear WRP.
  • So if write protection is also enabled, it must be removed separately.

This behavior is normal and consistent with the other bootloader interfaces as well:

  • On USART / I2C, the same rule applies:  RDP reset does not clear WRP.
  • The key difference is that some protocols provide a Write Unprotect command, while the current bootloader implementation for USB DFU does not.

For USB DFU, clearing write protection requires option byte modification. So, the current implementation follows the intended hardware behavior.

To give better visibility on the answered topics, please click on "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
ElmueAuthor
Associate II
September 1, 2026

You are telling me absolutely nothing new.

You only confirm what I rote in the first posting.

This implementation lacks any intelligence.
You provide a DFU command to remove read protection.

But if write protection is enabled there is NO DFU command to remove it.

So you cannot program the processor over DFU.

Why do you implement a command to remove read protection and there is no command to remove write protection?

 

You needed 3 months to only confirm what I already knew before.
This is a completely useless forum.

 

TDK
September 1, 2026

@Elmue To change option byte settings, use the Write Memory command, as described in AN3156. This is available in the USB DFU bootloader.

This will cause a system reset to apply the new option bytes:

The option byte registers/fields are given in the reference manual.

 

You should use Read Memory command to get current settings, change the write protection field, and then Write Memory to write the new value with the other fields unchanged.

"If you feel a post has answered your question, please click ""Accept as Solution""."