Sample program for communicating between application and net core in NRF5340

Hi,

We are developing a software application for our healthcare project on NRF5340 development kit. It requires an array of data (600 bytes approx) to be shared from application core to net core and vice versa.

Please could someone tell us a sample program (which can be used to share bytes of data) that we can take to communicate between the application and net core?

Also we would use the multicore program which would create a single build hex file called as "merged_domains.hex". Can we directly take this hex file and flash onto the NRF5340 board using the programmer tool?

We also need to know where the separate hex files would be present for each core in the "build" folder?

Thanks and regards

Ajit S J

  • I did the following:

    1. Open VS code. Create new application with these settings:


    2. Create build configuration with these settings:

    3. Let build configuration process complete.

    4. Hit "build" in ACTIONS menu.

    5. Start "Programmer" V3.0.8 from nrfconnect for desktop.

    6. Connect to dev board

    7. Add hex file C:\_btTest\rpmsg_service\build\zephyr\zephyr.hex

    8. Add hex file C:\_btTest\rpmsg_service\build\rpmsg_service_remote-prefix\src\rpmsg_service_remote-build\zephyr\zephyr.hex

    9. The "Programmer" UI now looks like this:

    10. Hit "erase and write"

    11.  Open two putty terminals to COM9 and COM10 (one for each core)

    12. Hit "reset" button (S3) on board after flashing is completed

    13. observe the following output in the terminals:

    I'm running this example on a BL5340 DVK from Laird (part number: 453-00052-K1).

  • I see. I built them separately (rpmsg_service for app core and rpmsg_service\remote for net core), and I see the same as you are seeing. I also see that this is reported as a bug internally. However, since it is in the Zephyr repository I am not sure what the flow will be for this. 

    I also see that when I built it for v2.1.2 it works, so this was broken some time after this. 

    I am sorry, but I don't have a fix for this right now. But I will ping the internal ticket and try to make them fix this for the next release.

    Best regards,

    Edvin

  • Hello Edvin,

    Thank you for your help. I've changed the SDK over to 2.1.2 and now I'm able to get the example to work. Unfortunately, making the switch means I'll have to make some changes to my main application to make everything work again.

    Do you happen to have an ETA on the next release? Or perhaps a work around we can implement temporarily?

  • Hello,

    I see from the internal ticket that there is a discussion whether or not we will put effort into making a fix "upstream" (meaning in the zephyr repository, which is not something that we can control directly). Please note that there are many samples in the zephyr directory that doesn't run (is not intended to run) on our boards. 

    I suggest, if you want a quick fix for this, you should report it as a github issue in Zephyr's github repository, and see if they can investigate the bug, and possibly provide a fix. 

    It looks like we will do the same, but chances are higher that a fix will come sooner if it is reported from several holds. 

    Best regards,

    Edvin

Related