cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling flash sectors protection through dfu

MDW
Associate II
Posted on May 18, 2017 at 11:33

Hi,

Is there a way to disable the ''Flash sectors protection'' through USB (DfuSeDemo/dfu-util/...)?

It can be done using the STM32 ST-LINK Utility,

by going to Target > Option Bytes, and unselecting all the sectors under ''Flash sectors protection''

and pressing Apply.

0690X00000606MpQAI.png

Note that the sectors were Read/Write Protected.

As described in the last post on this topic: 

https://community.st.com/message/60940

 

I would have to put the chip protection level to 1 and switch it back to 0 while changing the PCROP bit.

How would i go about doing this through the dfu-protocol or is this not possible.

Regards,

Michiel
1 ACCEPTED SOLUTION

Accepted Solutions
MDW
Associate II
Posted on June 09, 2017 at 11:57

I have received an answer from ST

'

(...) this is not possible with system DFU bootloader.

As you can find in reference manual for F401 (RM0368 rev4) page 58:

'The deactivation of the SPRMOD and/or the unprotection of PCROPed user sectors can only occur when, at the same time, the RDP level changes from 1 to 0'

And system bootloader is not accessible when RDP>0, so it's not possible to perform this action.

'

View solution in original post

1 REPLY 1
MDW
Associate II
Posted on June 09, 2017 at 11:57

I have received an answer from ST

'

(...) this is not possible with system DFU bootloader.

As you can find in reference manual for F401 (RM0368 rev4) page 58:

'The deactivation of the SPRMOD and/or the unprotection of PCROPed user sectors can only occur when, at the same time, the RDP level changes from 1 to 0'

And system bootloader is not accessible when RDP>0, so it's not possible to perform this action.

'