How much of the nRF5340 Shared RAM segment (0x2007000 - 0x207FFFF) does the Nordic BLE Soft Controller require?

We are using the nRF5340 in a multi-protocol application where we use the BLE Soft Controller in one mode and a proprietary protocol in another mode. Both protocols use the Shared RAM in region 0x20070000 - 0x2007FFFF for message and data exchange between their Hosts on the Application CPU and Controllers on the Network CPU.

We currently have 56 kBytes allocated to the Soft Controller (0x20070000 - 0x2007DFFF) and 8 kBytes allocated to our proprietary protocol (0x2007E000-0x2007FFFF). We have run out of space in this allocation for the proprietary protocol and would like to increase it by maybe 4 kBytes.

The question is what is the minimum Shared RAM allocation that the BLE soft controller needs? Our most intensive usage of the BLE soft controller configures it as a peripheral and GATT server. The Kconfig overlay for this configuration is attached.

Thank you,

Kevin

overlay-ble.conf

Parents
  • Hello,

    Where did you set the allocated SoftDevice controller size, and the proprietary protocol size? I will run this by our SoftDevice team, but I would like to just understand a bit more in detail what you already did before reaching out.

    Best regards,

    Edvin

  • From our devicetree:

    / {
       reserved-memory {
          /delete-node/ memory@20070000;

          sram_ipc0: memory@20070000 { /* BT HCI rmsgs */
             reg = <0x20070000 0xE000>;
          };

          sram_ipc1: memory@2007E000 {
             reg = <0x2007E000 0x1000>;
          };

            sram_shula: memory@2007F000 {
                compatible = "zephyr,memory-region", "mmio-sram";
                zephyr,memory-region = "SRAMSHULA";
                reg = <0x2007F000 0x1000>;
            };
       };

       ipc {
          /delete-node/ ipc0;

          ipc0: ipc0 {
             compatible = "zephyr,ipc-openamp-static-vrings";
             memory-region = <&sram_ipc0>;
             mboxes = <&mbox 0>, <&mbox 1>;
             mbox-names = "tx", "rx";
             role = "host";
             status = "okay";
          };

          ipc1: ipc1 {
             compatible = "zephyr,ipc-openamp-static-vrings";
             memory-region = <&sram_ipc1>;
             mboxes = <&mbox 2>, <&mbox 3>;
             mbox-names = "tx", "rx";
             role = "host";
             zephyr,priority = <1 PRIO_COOP>;
             status = "okay";
          };
       };
    };
  • Thank you for the details. I have not yet found anyone who can say what a recommended minimum should be, but someone pointed out that the distance measurement sample in NCS is using even less sram for the softdevice controller:

    It is using 20070000 -> 20077FFF for the SoftDevice Controller, and 0x20078000->2007FFFF for the proprietary distance measurement library. 

    Please see the nrf5340dk_nrf5340_cpuapp.overlay and nrf5340dk_nrf5340_cpunet.overlay files for the nrf_dm sample.

    Best regards,

    Edvin

  • I'm not very familiar with the distance measurement sample, but it seems that the GATT traffic from the server to the client uses infrequent and small-sized PDUs.  Our case is the opposite.  Isn't there a relationship to the MTU size, data length size, ACL tx/rx size, and buffer counts to the amount of SRAM used by the SoftDevice Controller?

Reply Children
Related