Skip to content

Commit cde2a29

Browse files
olivier-le-sagerlubos
authored andcommitted
bluetooth: samples: Reduce RAS sample memory usage
Reduce ranging profile samples' RAM based what CS capabilities are used in the sample parameters. Please read the RREQ and RRSP docs for more information about how to configure these. Memory usage comparison for ras_initiator sample on nrf54l05: Before: Memory region Used Size Region Size %age Used FLASH: 284120 B 500 KB 55.49% RAM: 92704 B 96 KB 94.30% IDT_LIST: 0 GB 32 KB 0.00% After: Memory region Used Size Region Size %age Used FLASH: 284120 B 500 KB 55.49% RAM: 64448 B 96 KB 65.56% IDT_LIST: 0 GB 32 KB 0.00% Signed-off-by: Olivier Lesage <[email protected]>
1 parent f8857a6 commit cde2a29

File tree

2 files changed

+28
-0
lines changed
  • samples/bluetooth

2 files changed

+28
-0
lines changed

samples/bluetooth/channel_sounding_ras_initiator/prj.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@ CONFIG_BT_BUF_ACL_RX_SIZE=502
3131
CONFIG_BT_ATT_PREPARE_COUNT=3
3232
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
3333

34+
# This reduces RAM usage. Additional RAM is needed to support optional
35+
# features such as mode 3 or multiantenna. Change or remove these if
36+
# using those features
37+
CONFIG_BT_RAS_MODE_3_SUPPORTED=n
38+
CONFIG_BT_RAS_MAX_ANTENNA_PATHS=1
39+
CONFIG_BT_CTLR_SDC_CS_MAX_ANTENNA_PATHS=1
40+
CONFIG_BT_CTLR_SDC_CS_NUM_ANTENNAS=1
41+
CONFIG_BT_CTLR_SDC_CS_STEP_MODE3=n
42+
43+
# This size assumes the largest step size is mode 2 with one antenna path:
44+
# 12 bytes * 160 steps in a subevent. Change or remove this if using mode 3
45+
# or multiantenna.
46+
CONFIG_BT_CHANNEL_SOUNDING_REASSEMBLY_BUFFER_SIZE=1920
47+
3448
# This allows CS and ACL to use different PHYs
3549
CONFIG_BT_TRANSMIT_POWER_CONTROL=y
3650

samples/bluetooth/channel_sounding_ras_reflector/prj.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@ CONFIG_BT_BUF_ACL_RX_SIZE=502
2222
CONFIG_BT_CTLR_DATA_LENGTH_MAX=251
2323
CONFIG_BT_CTLR_PHY_2M=y
2424

25+
# This reduces RAM usage. Additional RAM is needed to support optional
26+
# features such as mode 3 or multiantenna. Change or remove these if
27+
# using those features
28+
CONFIG_BT_RAS_MODE_3_SUPPORTED=n
29+
CONFIG_BT_RAS_MAX_ANTENNA_PATHS=1
30+
CONFIG_BT_CTLR_SDC_CS_MAX_ANTENNA_PATHS=1
31+
CONFIG_BT_CTLR_SDC_CS_NUM_ANTENNAS=1
32+
CONFIG_BT_CTLR_SDC_CS_STEP_MODE3=n
33+
34+
# This size assumes the largest step size is mode 2 with one antenna path:
35+
# 12 bytes * 160 steps in a subevent. Change or remove this if using mode 3
36+
# or multiantenna.
37+
CONFIG_BT_CHANNEL_SOUNDING_REASSEMBLY_BUFFER_SIZE=1920
38+
2539
# This allows CS and ACL to use different PHYs
2640
CONFIG_BT_TRANSMIT_POWER_CONTROL=y
2741

0 commit comments

Comments
 (0)