AnsweredAssumed Answered

HAL_FLASH_ERROR_WRP

Question asked by Rami Rosenbaum on Aug 4, 2017

Hi,

I have a legacy device, a bootloader, running on a STM32F101CBT6.

I don't have it's code, so I'm not sure of what's it doing exactly... but I know it locks the flash.

 

My goal is to upload an application, with a payload - my new bootloader, and to flash it to address 0x08000000.

 

I managed to upload my application, but when trying to write (or erase) the flash at 0x08000000, it fails with HAL_FLASH_ERROR_WRP:

failed to erase flash, status: 0x1, address: 0x08000000, error: 0x2

 

On a development device, if I try connecting with ST-Link Utility (via ST-Link), I get a pop-up: disable read out protection.

 

How do I overcome the issue, dynamically, from within the application?

Outcomes