Flash Image API on Network Core

Hi,

When I try to use the Flash Image API on the Network Core I get build errors. The problem seems to be that some symbols are not defined, as there is no MCUboot bootloader on the Network Core (but there is one on the Application Core).

What is the intended way to use the Flash Image API to write image data from the Network Core to an image slot of the Application Core?

(Additional info: I tried defining the missing symbols (PM_MCUBOOT_PRIMARY_ID and PM_MCUBOOT_SECONDARY_ID) wherever they are needed, just to see if the build succeeds. Indeed it does, but the init function of the Flash Image API then fails, which is not surprising as these symbols were defined manually and seem to be missing in the project setup.)

  • Hi nkost,

    Thank you for being patient. I have gone through documentation again.

    - Yes, writing flash is managed by the NVMC

    - For the nrf4350, the application core memory is mapped to the network core memory map

    - This means that the network core CPU can access and use the application core memory for shared memory communication.

    - Even then, the application core can restrict network core access through the domain configuration (DCNF) PROTECT registers. Access to secure memory or peripherals is also prevented when the network core is marked as non-secure

    The network core can access application core resources (flash, RAM, and peripherals) when granted permission through the application's DCNF and SPU settings. A small portion of the application core RAM is dedicated to the exchange of messages between the application and network cores.

    - We have IPC (interprocessor communication) periphereal that is used to send and receive events between MCUs.

    - An IPC event often does not contain any data itself, it is used to signal other MCUs that something has occurred.

    - Data can be shared through shared memory, for example in the form of a software implemented mailbox, or command/event queues.

    - It is up to software to assign a logical functionality to an IPC channel. For instance, one IPC channel can be used to signal that a command is ready to be executed, and any processor in the system can subscribe to that particular IPC channel and decode/execute the command.

    You can look more into the IPC and using OpenAmp.

    Regards,

    Naeem

  • Hi Naeem,

    Thank you for your answer.

    The network core can access application core resources (flash, RAM, and peripherals) when granted permission through the application's DCNF and SPU settings.

    This is what I need but does not yet work (the access to the flash, I don't need access to the RAM and the peripherals).

    I know about the IPC, but that is not what I need. I want to access the flash directly from the network core and not to send the data from the network core through IPC to the application core.

    Did you find a way to get the example from above to work?

  • Hi nkost,

    I was not able to do it successfully, and we don't have any specific example/sample for your case as well.

  • I've found a way to do what I want, but there are still open questions.

    It works when I access the AppCore's NVMC over its Secure base address (0x50039000) from the NetCore using the nrfx HAL. From my understanding it should also work, when accessing the AppCore's NVMC over its Non-Secure base address (0x40039000), when the DCNF and SPU settings are configured accordingly, but I can't get that to work properly (meaning, I can access and configure the peripheral, but when trying to write to the flash, I get the above described fault).

    From the information in the documentation, both ways should work. The question that remains is: How does it work?

  • Hi nkost,

    Can you please share your project/code where you are successfully accessing the app-core flash region using the secure nvmc.

Related