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

NCS: SRAM usage overflow with data length extension support on hci_rpmsg

Hi

I'm playing around with the configuration of the hci_rpmsg as child image in the NCS 1.5.1 release. I've added a hci_rpmsg.conf file in a "child_image" folder and added there my configuration extension for the hci_rpmsg project. It worked properly, but when I tried to enable the data length extension I've struggled over a massive SRAM usage for this feature.

When I compile it without any configuration change I get the following memory footprint for the network CPU:

Memory region Used Size Region Size %age Used
FLASH: 179084 B 256 KB 68.32%
SRAM: 45836 B 64 KB 69.94%
IDT_LIST: 168 B 2 KB 8.20%

When I try to enable the data length extension to the max supported size of 251 the memory already overflows:

Memory region Used Size Region Size %age Used
FLASH: 179084 B 256 KB 68.32%
SRAM: 67340 B 64 KB 102.75%
IDT_LIST: 168 B 2 KB 8.20%

If we divide the difference of SRAM usage and the increase of the buffer we should get the number of buffers that are using this "size", right?

BufferCount = (67340 - 45836) / (251 - 27) = 96

Why is this buffer used 96 times? Is there some other configuration wrong? What would be a good configuration for maximal data length extention?

Regards Adrian

Parents Reply
  • Hi Sigurd

    That was the right hint. I didn't think about the connection count that also multiplies with the buffer count. By adding the CONFIG_BT_MAX_CONN I was able to make it compile and flash it.

    After this was fixed I tested the data length extension in the NCS 1.5.1. On my tests with nRF5340 DK (and even a nRF52840 DK) with a hci_usb example. I'm able to trigger the data length extension process, but I don't get the response from the peer device. The only way to make it work again is to switch back to the Zephyr LL layer by setting the CONFIG_BT_LL_SW_SPLIT option to 'y'. Is it possible that the data length implementation is somehow broken in the softdevice controller?

    Regards Adrian 

Children
Related