- The PNB in FLASH_CR wasn't cleared before every erase operation and the new value was just stacked on top. After a couple of erase the PNB written was overlapping with old ones failing to erase the correct page.