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

nRF53 NET core flashing, only first 4 KiB flashed unless a mass erase is performed.

I am not sure whether this is an issue with the nRF53 Engineering Example or with the SEGGER software. 

I don't see any errata describing the behaviour I am experiencing:

When I try to run an application on the NET core, it will only write the first 4 KiB to flash. 

I have to do a mass erase of the NET core for the whole application to be written to flash.

I am using SEGGER software version V6.86e with GDB version 9.2

Parents Reply Children
  • Hi,

    I see. I have not been able to reproduce any of the issues using 6.86e or 6.86f with nrfjprog, but perhaps it matters which J-Link tool you use and how. Can you elaborate on how you reproduce this?

  • I am using Eclipse with the GNU MCU Eclipse plugin and GDB version 9.2. 

    I have configured two projects, one for the application core, and one for the network core.

    1) I launch a debugger session for the Network Core, 

    2) I launch a debugging session for the Application Core,

    3) I start the Application core,  (it will execute nrf_reset_network_force_off(NRF_RESET, false);  )

    4) I start the Network Core. 


    Using version 6.86e:

    Using JFlashLiteExe, I first erase the Network core.

    I follow these steps for an empty loop net application.

    Result: The application runs as expected.

    Then, I will create an application that changes the locations where certain code resides in flash. I archieve this by adding a call to sprintf in my code. When I run the network core, it will hard fault. The location of the hard fault is beyond 0x1001000. The disassembly of the code shows "<UNDEFINED> instruction: 0xffffffff", indicating the flash has not been written.

    When I perform a flash erase using JFlashLiteExe, and then perform these steps again, the network core runs as expected. 


    Using version 6.86f: 

    The behaviour is little different then I had before (Previously I swapped the order of launching) 

    When I try to erase the network core using JFlashLiteExe, the device is secured message pops up.

    When I choose yes, the JFlashLite indicated it succeeded. 

    When I launch the network core, the popup comes again.

    When I choose yes, the launch fails with "Starting J-Link GDB Server timed out."

    When I choose no, the launch continues, but it seems without flashing, as the application halts at 0xdeadbeee. (rather then waiting for the application core to release the network core) 

  • Hi,

    I am a bit surprised that you get this behaviour using 6.86f, as that fixes a known issue with segger complaining about the network core being locked. Perhaps this is related to the GNU MCU Eclipse plugin somehow? That is not something I have experience with or Nordic supports, though.

    Apart from the issue fixed in 6.86f, programming and debugging should work well using 6.86e or higher using the segger tools themselves.

  • Hi,

    Looking at SEGGER's change log, it says

    "Device protect check for nRF5340_xxAA_NET core of nRF5340 series device according to new hardware revision (v0.9.0 or newer), adapted. SECUREAPPROTECT bit only for nRF5340_xxAA_APP core implemented."

    Could it be that this issue occurs because I my PDK is version 0.8.0?

  • Hi,

    Yes. I also get an error about the device being protected (on an internal 0.7 version in my case, but that is more or less identical to 0.8), though it can be ignored. I will report that.

    Regarding the original issue I have not been able to reproduce it or find other references to this issue. Perhaps doing a mass erase before each programing is a sensible workaround for now.

Related