2025-01-28 12:53 AM - edited 2025-01-28 12:57 AM
Hi,
i tried to write a option byte, which did not work i think.
A FLASH mass erase with the programmer does not work: "Error: Mass erase operation failed.Please verify flash protection"
Is it possible to brick a chip with a failed flash write operation?
while(READ_BIT(FLASH->SR, FLASH_SR_BSY)); // Wait to until no flash activity
if(HAL_FLASH_Unlock(); // Unlock FLASH
HAL_FLASH_OB_Unlock(); // Unlock Option bytes
WRITE_REG(FLASH->OPTR, 0xfbeff8aa);
SET_BIT(FLASH->CR, FLASH_CR_OPTSTRT);
while(READ_BIT(FLASH->SR, FLASH_SR_BSY)); // Wait to until no flash activity
Solved! Go to Solution.
2025-01-28 01:56 AM
Just found the cause:
Readout protection was set to "FF". Since i did not set it, i did not consider it. Everyday you learn something new....
Setting it to "AA" solved the issue.
2025-01-28 01:56 AM
Just found the cause:
Readout protection was set to "FF". Since i did not set it, i did not consider it. Everyday you learn something new....
Setting it to "AA" solved the issue.