I'm using STM32F105RB chip with built-in bootloader code (jumping to bootloader by selecting BOOT0/BOOT1 voltages)
If part of the chip is write protected then chip erase fails , and the MCU eventually reboots into its previous firmware after leaving DFU mode
However if any sectors of the chip are write protected AND at the same time the mcu is read protected, then DfuSe offers to disable read protection, outputs error and at this point the MCU flash memory has been cleared successfully
After reentering DFU mode, normal upload is possible
Question: how can I get around the problem?