cancel
Showing results for 
Search instead for 
Did you mean: 

Reset product state to open by firmware with mass erase

Heinz_Baumer
Visitor

Hello.

Is it possible to reset the product state from closed to open
internaly by the firmware on a STM32H563?

Can i do this easy by rewriting the ProductState to 0xED, or do i need additional provision information or the provisioning password to do this?

 

I don't want to kill my stm32-board, if i rewrite the product state and there is no way to do a Regression with STM32CubeProgrammer after this..

 

FLASH_OBProgramInitTypeDef OB;
HAL_FLASHEx_OBGetConfig(&OB);

HAL_FLASH_Unlock();
HAL_FLASH_OB_Unlock();

OB.ProductState = OB_PROD_STATE_OPEN;

if ( HAL_FLASHEx_OBProgram(&OB) != HAL_OK )
{
	HAL_FLASH_OB_Lock();
	HAL_FLASH_Lock();
	return HAL_ERROR;
}

HAL_FLASH_OB_Launch();

HAL_FLASH_OB_Lock();
HAL_FLASH_Lock();

 

 

 

 

0 REPLIES 0