Guidelines to reduce the size of sram0_shared for Bluetooth apps on nRF5340

HI, I'm writing firmware on the nRF5340 that uses both the app core and the net core. The firmware uses Bluetooth, so the net core runs hci_rpmsg and "talks" to the app core via IPC using the sram0_shared memory area. The size of this memory area seems to be 64kB for all the nRF5340-based boards in the Zephyr repository. Judging from the git logs, that size seems to have been there since the first commit of the nrf5340dk_nrf5340 target. However, that feels like a lot of memory, and since I can use all the RAM I can get on the app core, I was wondering if I can reduce it, but I don't know how low I can go. I'm using Bluetooth to connect with some simple sensors and for firmware updates, nothing fancy. Does anybody have some experience with this? Besides the obvious "keep on reducing it until something breaks" Slight smile
Thank you.

Parents
  • Hello,

    Sorry, I misread your question. That's why I pointed out the memory optimisation guide in my first response. Now, coming to your question, it's hard to provide a minimum size of the shared SRAM you need to keep or how low you can go, as it depends on the application, like the maximum packet size. I can only recommend that you do some testing so that your application works properly and won't harm your whole system. This query has been raised before, and we are discussing it internally, but so far I don't have a clear-cut answer to provide. See this thread, which discusses something very similar.

    Kind Regards,

    Abhijith

Reply
  • Hello,

    Sorry, I misread your question. That's why I pointed out the memory optimisation guide in my first response. Now, coming to your question, it's hard to provide a minimum size of the shared SRAM you need to keep or how low you can go, as it depends on the application, like the maximum packet size. I can only recommend that you do some testing so that your application works properly and won't harm your whole system. This query has been raised before, and we are discussing it internally, but so far I don't have a clear-cut answer to provide. See this thread, which discusses something very similar.

    Kind Regards,

    Abhijith

Children
Related