flash/nor/nrf5: check protection before flash erase/write on nRF51