Skip to main content
Heinz_Baumer
Associate III
February 4, 2025
Question

Reset product state to open by firmware with mass erase

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();

 

 

 

 

This topic has been closed for replies.

2 replies

Heinz_Baumer
Associate III
February 6, 2025

Hello.
No one there, who has done this?

The Ref-manual from the STM32H5, page 296 of 3152 says, there is a possibility to change the product state from: 

  • closed to regression, and from:
  • regression to open.

 

 

 

Associate III
May 5, 2025

hi, did you manage to solve this problem?