This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Unable to flash nRF5340-PDK net core

Hi,

I'm trying to flash my network kernel code to the nRF5340-PDK network core over JTAG. It's a custom research OS called Tock that you can look at here. The code is fairly simple and only attempts to turn on an LED, but it does not appear to run properly. The code that I am attempting to flash to the network core can be found here.

I'm flashing the network kernel to address 0x1000000, I have made sure to enable the network core and assign the GPIO pins I'm using to the network core from the application core, and the application core runs fine. Any ideas as to what I should look into next?

Thanks

  • You need to use the --coprocessor argument when flashing/erasing/recovering the network core:

    nrfjprog --recover --coprocessor CP_NETWORK

    As you can see from this snippet, writing memory or running the recover argument does not affect the flash area in the network core when the CP_NETWORK coprocessor is chosen:

    >nrfjprog --memwr 0x01001000 --val 0x00000000
    Parsing parameters.
    Writing.
    
    >nrfjprog --memrd 0x01001000 --coprocessor CP_NETWORK
    0x01001000: FFFFFFFF                              |....|
    
    >nrfjprog --memwr 0x01001000 --val 0x00000000 --coprocessor CP_NETWORK
    Parsing parameters.
    Writing.
    
    >nrfjprog --memrd 0x01001000 --coprocessor CP_NETWORK
    0x01001000: 00000000                              |....|
    
    >nrfjprog --recover
    Recovering device. This operation might take 30s.
    Writing image to disable ap protect.
    Erasing user code and UICR flash areas.
    
    >nrfjprog --memrd 0x01001000 --coprocessor CP_NETWORK
    0x01001000: 00000000                              |....|
    
    >nrfjprog --recover --coprocessor CP_NETWORK
    Recovering device. This operation might take 30s.
    Writing image to disable ap protect.
    Erasing user code and UICR flash areas.
    
    >nrfjprog --memrd 0x01001000 --coprocessor CP_NETWORK
    0x01001000: FFFFFFFF                              |....|

    nrfjprog only supports hex-files, but if you can make your build system output a hex-file, or convert it from the .bin/.elf file, you should be able to flash it using nrfjprog.

  • Hey Jørgen, thanks for all of the help. I finally got the network core flashed and booting properly, it turns out that I had also included the errata fixes for the application core in the network core image on accident, oops.

Related