Troble saving the bonded devices list in NVR2

The write enable function for NVR2 hangs everytime.
Is there something that i’m doing wrong? I am jsut using the peripheral_server_bond example code.

image

What other bits are set in the FLASH->IF_STATUS register?

It may be better if the example code only checked for the NVR2 unlock status such as:

bool NVR2_unlocked = (FLASH->IF_STATUS & FLASH_NVR2_W_UNLOCKED) == FLASH_NVR2_W_UNLOCKED;