Unable to flash due to protection on device, required to erase flash memory

Hi,

I need to capture the data packet transmitted by ble from my phone (acting as Central), I followed the Bluetooth LE sniffer example and was able to capture the data packet.

However, when I try to flash my original script on VScode to my board without erasing the LE sniffer firmware I flashed from the nrf Connect desktop earlier, I was prompted by an error saying "Flashing failed due to protection on the device.

I was wondering if there is a way to flash without erasing the previous memory? Or am I doing it wrong?

Thanks for your patient,

Johan 

Parents
  • Hi Johan,

    The sniffer firmware is based on an older SDK version that did not have support for the updated access port protection in the latest revision of the nRF52 series devices. So access port protection will alway be enabled after you have flashed the sniffer firmware. And in that case, the only way to re-program it is to perform a recover (ERASE-ALL) operation. I do not see a problem with doing that, though? You can do it either from nRF Connect for VS Code, or from the command line (for instance with "nrfjprog --recover").

    Einar

  • Hi Thomas,

    Thks for the fast reply. But wouldn't that erased my other program which I have flashed into the board?

    I followed the le sniffer tutorial, and the first thing to do was to erase and upload sniffer firmware into the board. However, I also need my previous code (the modified UART tutorial actually) to run togather with the sniffer.

    Regards,

    Johan

Reply Children
Related