cancel
Showing results for 
Search instead for 
Did you mean: 

Did i just brick my G431 with a failed FLASH option byte write?

Tobe
Senior III

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tobe
Senior III

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.

View solution in original post

1 REPLY 1
Tobe
Senior III

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.