Unable to recover/flash nrf5340 on nrf7002-DK

Hi,

I recently purchased nrf7002-DK and wanted to evaluate it.

I was first able to flash the blinky example, and it seems to work (although maybe it was the pre-loaded blinky program).

I was hoping to see some output on VCOM1, but I did't see any. I build/flashed the "three thread" example (Board: nrf7002dk_nrf5340_cpuapp_ns). it didn't appear to work (didn't see any LEDs flashing nor message on terminal).

I erased it and tried to re-flash the blinky example, but it would not flash. I have a suspicion that I didn't do the erase process in the correct order.

I used the Programmer v3.0.8, and it shows that "device is protected".

I also tried: 

>> nrfjprog --recover --coprocessor CP_NETWORK

Failed to enable coprocessor with unknown error.

ERROR: Access to the selected address is blocked by the SPU.

After doing some search, I cam across the nordic documentation site: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.5.0/nrf/ug_nrf5340.html#readback-protection-error

"Recovering the network core erases the flash memory of both cores. Recovering the application core erases only the flash memory of the application core. Therefore, you must recover the network core first. Otherwise, if you recover the application core first and the network core last, the binary written to the application core is deleted and readback protection is enabled again after a reset."

I probably didn't erase it in the correct order (should have been more careful).

Anyway, is there a way to fix my nrf7002-DK? Have I messed it up beyond repair?

I haven't even got to do any wifi stuff...

Thanks,

Makoto

  • Hi Makoto

    I will have to get back to you tomorrow as I need to do some digging and asking around before coming back with a definitive answer. Thank you for your patience!

    Best regards,

    Simon

  • Hi Makoto

    Can you link to the documentation pages of the applications you've tried to flash onto the nRF7002 DK? As I'm not sure I've heard of this "three thread" sample you mention. 

    As for the issue you're seeing, I don't think your DK is broken, but rather that it's related to an issue with the latest version of nrfjprog and the nRF Connect VS Code extension where there has been an issue putting the nRF5340 SoC in a state like this. Can you try what Joe Kane suggests here to see if that helps you recover the device correctly? 

    Best regards,

    Simon

  • Hi Simon,

    Thank you for your help.

    I got the "three threads" example from zephyr site: https://docs.zephyrproject.org/latest/samples/basic/threads/README.html

    Regarding using the "standalone Nordic Programmer app", would this mean the programmer app?

    If so, I am using nrf Connect Desktop (v.4.1.1) and from there I launch the programmer app (v.3.0.8).

    I am able to connect to nrf7002-DK, and tried "Erase all". The result is still the same, I get: "Device is protected".

    I tried using different JLink versions but same results: JLink_V7.80c, JLink_V788a, JLink_V788d

    Not sure if it matters, but I am using a Mac with M2 chip.

    Best Regards,

    Makoto

  • Hi again

    makoto.inoue said:

    If so, I am using nrf Connect Desktop (v.4.1.1) and from there I launch the programmer app (v.3.0.8).

    I am able to connect to nrf7002-DK, and tried "Erase all". The result is still the same, I get: "Device is protected".

    Yes, that would be the Programmer app.

    The "correct" way to recover your board according to our devs though, assuming that what has happened is that you have locked your application core, which makes it impossible to unlock the NET core if its powered down, would be the following:

    1. Unlock the application core using nrfjprog --recover --coprocessor CP_APPLICATION

    2. Recover the NET core using nrfjprog --recover --coprocessor CP_NETWORK

    3. Recover the application core a second time, with nrfjprog --recover --coprocessor CP_APPLICATION as recovering the NET core erases the application core.

    Best regards,

    Simon

  • Hi Simon,

    Thank you for your message.

    I have tried the steps you mentioned. However, following is what I get:

    ----

    nrfjprog --recover --coprocessor CP_APPLICATION

    Recovering device. This operation might take 30s.

    ERROR: Recover failed. Please make sure that the correct device family is given

    ERROR: and try again.

    ---

    Naturally the rest of the steps do not work either...

    Best Regards,

    Makoto

Related