Skip to content

Commit f593784

Browse files
committed
app: Reduce RAM requirements when conn manager is disabled
Now that connection manager is removed, the RAM requirements are lower. This patch reduces buffers and stacks to values that should be sufficient for Wi-Fi and CoAP. Signed-off-by: Jan Tore Guggedal <jantore.guggedal@nordicsemi.no>
1 parent 9dfb01f commit f593784

File tree

2 files changed

+16
-22
lines changed

2 files changed

+16
-22
lines changed

app/boards/thingy91x_nrf9151_ns.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ CONFIG_NRF70_BH_WQ_STACK_SIZE=1024
3030
CONFIG_NRF70_IRQ_WQ_STACK_SIZE=1024
3131
# Scan only using offload API
3232
CONFIG_WIFI_NM_WPA_SUPPLICANT=n
33-
CONFIG_NET_STATISTICS_WIFI=y
3433

3534
# Wifi scan requires extended heap size
3635
# Heap allocations should be changed when CONFIG_LOCATION_METHOD_WIFI_SCANNING_RESULTS_MAX_CNT

app/prj.conf

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ CONFIG_HEAP_MEM_POOL_SIZE=12288
2929
CONFIG_HEAP_MEM_POOL_IGNORE_MIN=y
3030
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1408
3131

32-
# Enable Networking and Connection Manager.
32+
# Enable Networking
3333
CONFIG_NETWORKING=y
3434
CONFIG_NET_SOCKETS=y
3535

@@ -172,32 +172,27 @@ CONFIG_LOCATION_REQUEST_DEFAULT_GNSS_VISIBILITY_DETECTION=y
172172
CONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT_GPS=y
173173
CONFIG_NRF_CLOUD_AGNSS=y
174174

175-
# For nRF9160 the default is socket interface
176-
CONFIG_NET_DEFAULT_IF_ETHERNET=y
177-
CONFIG_MBEDTLS=n
178-
179-
# Networking
180-
CONFIG_NET_L2_ETHERNET=y
181-
CONFIG_NET_NATIVE=y
175+
# Minimal networking for LTE offloaded sockets + CoAP + WiFi scan
182176
CONFIG_NET_IPV4=y
183-
CONFIG_NET_DHCPV4=y
184-
CONFIG_NET_STATISTICS=y
185-
CONFIG_NET_STATISTICS_USER_API=y
186-
CONFIG_NET_CONTEXT_SYNC_RECV=y
177+
CONFIG_NET_IPV6=n
178+
CONFIG_NET_NATIVE=y
179+
CONFIG_NET_DHCPV4=n
187180

188-
# Memory configurations
181+
# Network buffers and packets (need enough for concurrent WiFi scan + CoAP)
189182
CONFIG_NET_BUF_RX_COUNT=8
190183
CONFIG_NET_BUF_TX_COUNT=8
191-
CONFIG_NET_PKT_RX_COUNT=1
192-
CONFIG_NET_PKT_TX_COUNT=1
193-
CONFIG_NET_TX_STACK_SIZE=512
194-
CONFIG_NET_RX_STACK_SIZE=512
195-
CONFIG_NET_TC_TX_COUNT=1
196-
CONFIG_NET_MAX_CONTEXTS=5
184+
CONFIG_NET_PKT_RX_COUNT=4
185+
CONFIG_NET_PKT_TX_COUNT=4
186+
187+
# Network thread stack sizes (need headroom for CoAP/DTLS processing)
188+
CONFIG_NET_TX_STACK_SIZE=1024
189+
CONFIG_NET_RX_STACK_SIZE=1024
197190
CONFIG_NET_MGMT_EVENT_STACK_SIZE=1280
198191

199-
# Needed due to using connectivity manager
200-
CONFIG_NET_IF_MAX_IPV6_COUNT=2
192+
# Network resources (multiple contexts needed for CoAP + WiFi operations)
193+
CONFIG_NET_TC_TX_COUNT=1
194+
CONFIG_NET_MAX_CONTEXTS=5
195+
CONFIG_NET_MAX_CONN=4
201196
CONFIG_NET_IF_MAX_IPV4_COUNT=2
202197

203198
# For debugging purposes

0 commit comments

Comments
 (0)