See the System Event Log for more information.' (The System Event Log only contains the error: The IO operation at logical block address 0 for Disk 1 was retried. diskpart clean: 'Diskpart has encountered an error: The request could not be performed because of an I/O device error.Changing registry key HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlStorageDevicePolicies to 0.HP USB Disk Storage Format Tool: 'Device media is write-protected'.Windows format: 'The disk is write protected'.
Most of them work just fine, but a couple of them won't let me format them because they are 'write-protected.' There is no write protection switch on the device. However, most low-level attackers will usually refrain from the cost of doing so.I ordered a bunch of 1GB usb drives from a semi-shady Chinese company. Even some specific security MCUs have some security issues, see e.g. Given the fact that the STM32 family is not a family of dedicated security microcontrollers with specific countermeasures, this is rather easy if you have the right equipment and sufficient experience in this area. One of the most popular methods of resetting the RDP bit without mass-erasing the flash is to disable the RDP with a laser.
STM32X DEVICE PROTECTED SOFTWARE
One summary answer I can give is that it's pretty secure if you assume the protection has no inherent bugs and someone uses software tools only. That's a tough question that can't really be answered without additional information. Once activated, you can verify that the RDP is active by trying to flash the MCU using your usual programming command sequence Deactivating RDPĭeactivating it is just as simple: Just use stm32f1x unlock (or stm32f2x unlock for F2/F4 devices) like this: # Set RDP to level 0 Where ocd-lock.cfg contains the command sequence shown above. Note that the readout-protection will only be in effect once the microcontroller is reset or powered off (that's why there's a second reset in the command sequence).Ī typical OpenOCD call could look like this: openocd -d0 -f stlink-v2.cfg -f ocd-stm32f0.cfg -f ocd-lock.cfg Just like executing the program command to flash your firmware, you can use the stm32f1x lock command (or stm32f2x lock for STM32F2/F4) to activate it.Ī typical OpenOCD configuration file would look like this (you need to flash the correct firmware before running this): # Set RDP to level 1
The activation feature is actually built-in into OpenOCD using the lock command.
STM32X DEVICE PROTECTED MANUAL
Refer to the reference manual for details.
STM32X DEVICE PROTECTED HOW TO
In order to avoid mistakes that will certainly brick the microcontroller, I will not show how to enable RDP level 2 in this answer. Usually you want to activate RDP level 1. The only way of updating your firmware is via some bootloader mechanism. Using OpenOCD, how can I enable/disable the. The STM32 family of microcontrollers features a read-out protection feature so proprietary code can't be read out via the debug interface (JTAG or SWD).
First, you have to know which level of readout protection you want to set (refer e.g.