Solved
STM32G0B1 programming Option Bytes stopped after OBL_Launch
The MCU stops when the program reaches this line (FLASH->CR |= FLASH_CR_OBL_LAUNCH;) in the function below.
The option bytes I want to write are at the moment still unchanged to the delivery state. Later they will be changed to RDP Level 1.
void Optionbytes_Config(void)
{
Flash_Unlock();
Optionbytes_Unlock();
FLASH->OPTR = 0xFFFFFEAA;
while((FLASH ->SR & FLASH_SR_BSY1) == FLASH_SR_BSY1);
FLASH->CR |= FLASH_CR_OPTSTRT;
while((FLASH ->SR & FLASH_SR_BSY1) == FLASH_SR_BSY1);
FLASH->CR &= ~FLASH_CR_OPTSTRT;
FLASH->CR |= FLASH_CR_OBL_LAUNCH;
while((FLASH ->SR & FLASH_SR_BSY1) == FLASH_SR_BSY1);
FLASH->CR |= FLASH_CR_LOCK;
FLASH->CR |= FLASH_CR_OPTLOCK;
}Thank you for your help.

