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

  • Hi Thorsrud,

    Sry for the typo of ur name, was typing from my phone and it auto correct

  • Hi Johan,

    No problem Slight smile

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

    That is on a different board, right? When you flashed the sniffer firmware on a DK or dongle, you erased what was on that board from before in the process. So there is nothing here other than the sniffer firmware, that will have to be replaced when you want to re-use the board for something other than sniffer.

    Johan83 said:
    I also need my previous code (the modified UART tutorial actually) to run togather with the sniffer.

    Then you need two boards (one you use as a sniffer, and one you test and develop on)

Reply
  • Hi Johan,

    No problem Slight smile

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

    That is on a different board, right? When you flashed the sniffer firmware on a DK or dongle, you erased what was on that board from before in the process. So there is nothing here other than the sniffer firmware, that will have to be replaced when you want to re-use the board for something other than sniffer.

    Johan83 said:
    I also need my previous code (the modified UART tutorial actually) to run togather with the sniffer.

    Then you need two boards (one you use as a sniffer, and one you test and develop on)

Children
Related