Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth: Controller: Recent RAM usage increase for hci_rpmsg build #49624

Closed
Thalley opened this issue Aug 29, 2022 · 7 comments · Fixed by #50480
Closed

Bluetooth: Controller: Recent RAM usage increase for hci_rpmsg build #49624

Thalley opened this issue Aug 29, 2022 · 7 comments · Fixed by #50480

Comments

@Thalley
Copy link
Collaborator

Thalley commented Aug 29, 2022

Is your enhancement proposal related to a problem? Please describe.
Recently the file ull_llcp.c file was added, which increased the RAM usage of the hci_rpmsg sample by roughly 4500 bytes. The result of this is that CONFIG_BT_CTLR_SYNC_ISO and CONFIG_BT_CTLR_ADV_ISO can no longer fit in RAM for the sample anymore.

Describe the solution you'd like
Since the hci_rpmsg is a sample that makes it possible to use the nRF5340 across multiple cores (app and net core), it is imperative that it is possible to build a general-use controller build with that sample. It should be possible to use the hci_rpmsg with extended advertising and ISO support (both connected and broadcast).

Describe alternatives you've considered
N/A

Additional context
I've attached logs of a recent commit (53f2ccf2a2f587882503e4eece00fa871a9492d5) and an older (pre ull_llcp.c) commit (c3302d5f41c9f17775f4c69a5baa9e8c72f9cf3d) that shows the increase in memory. The logs files are from building hci_rpmsg with CONFIG_BT_EXT_ADV=y, CONFIG_BT_PER_ADV_SYNC=y and CONFIG_BT_CTLR_SYNC_ISO=y.

ram_53f2ccf2a2f587882503e4eece00fa871a9492d5.txt
ram_c3302d5f41c9f17775f4c69a5baa9e8c72f9cf3d.txt

@Thalley
Copy link
Collaborator Author

Thalley commented Aug 29, 2022

ping @cvinayak @kruithofa @wopu-ot

@Thalley
Copy link
Collaborator Author

Thalley commented Aug 29, 2022

I also created #49623 so that we can track the (vanilla) edition of the sample on the nRF5340 netcore.

@wopu-ot
Copy link
Collaborator

wopu-ot commented Aug 29, 2022

We are seeing an increase in memory consumption for our platform as well. ping @erbr-ot

@ppryga-nordic
Copy link
Collaborator

@Thalley does it mean that with enabled ISO (and other required features) the sample is about edge of free memory for nRF5340 net core?

@Thalley
Copy link
Collaborator Author

Thalley commented Aug 30, 2022

@Thalley does it mean that with enabled ISO (and other required features) the sample is about edge of free memory for nRF5340 net core?

It actually goes over the edge if I enable both CONFIG_BT_CTLR_SYNC_ISO and CONFIG_BT_CTLR_ADV_ISO (so that is excluding support for connected ISO).

Vinayak has also pointed out that by default the BT_CONN_MAX is 16 for this build, so some memory can be free'd if I lower that value.

@kruithofa
Copy link
Collaborator

RAM usage for vanilla hci-rpmsg sample was reduced, but there is still a significant memory usage for the hci-rpmsg sample with both sync receiver and broadcast source enabled

@kruithofa kruithofa reopened this Dec 13, 2022
@kruithofa
Copy link
Collaborator

Increased RAM usage is pretty much a result of added functionality.
Adjusting parameters (like reducing max. nr. of connections) will help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants