diff --git a/Kconfig.nrf b/Kconfig.nrf index 25c67b41312d..050c099ac8ef 100644 --- a/Kconfig.nrf +++ b/Kconfig.nrf @@ -121,6 +121,24 @@ config NRF_SECURITY_ENABLER imply MBEDTLS_ENABLE_HEAP if BT_HOST_CRYPTO_PRNG || BT_ECC || BT_GATT_CACHING || BT_CRYPTO depends on !SOC_NRF5340_CPUNET +# Bluetooth TX processor thread stack Thread Analyzer measurements +# Apply SoC-specific defaults here to avoid touching upstream Zephyr files. +# Applications can still override via prj.conf. +configdefault BT_TX_PROCESSOR_STACK_SIZE + # nRF52 variants + default 768 if SOC_NRF52840 + default 696 if SOC_NRF52832 + default 969 if SOC_NRF52833 + # nRF53 (application core) + default 688 if SOC_NRF5340_CPUAPP + # nRF54H20 (application core) + default 624 if SOC_NRF54H20_CPUAPP + # nRF54L15 (application core) + default 856 if SOC_NRF54L15_CPUAPP + # nRF54L V10A / LM20A (currently application core EngA variants are used) + default 856 if SOC_NRF54LV10A_ENGA_CPUAPP + default 856 if SOC_NRF54LM20A_ENGA_CPUAPP + if SOC_SERIES_BSIM_NRFXX && ENTROPY_GENERATOR config MBEDTLS_HEAP_SIZE int diff --git a/applications/nrf_desktop/configuration/nrf52820dongle_nrf52820/prj.conf b/applications/nrf_desktop/configuration/nrf52820dongle_nrf52820/prj.conf index 7106856d9a4d..74e6f94694f4 100644 --- a/applications/nrf_desktop/configuration/nrf52820dongle_nrf52820/prj.conf +++ b/applications/nrf_desktop/configuration/nrf52820dongle_nrf52820/prj.conf @@ -48,6 +48,8 @@ CONFIG_BT_RECV_WORKQ_SYS=y CONFIG_BT_GATT_DM_WORKQ_SYS=y # Disable Bluetooth long workqueue to reduce memory consumption CONFIG_BT_LONG_WQ=n +# Don't use BT TX processor thread due to limited RAM. +CONFIG_BT_TX_PROCESSOR_THREAD=n # Limit number of key slots in the PSA Crypto core to reduce memory consumption CONFIG_MBEDTLS_PSA_KEY_SLOT_COUNT=10 diff --git a/applications/nrf_desktop/configuration/nrf52820dongle_nrf52820/prj_release.conf b/applications/nrf_desktop/configuration/nrf52820dongle_nrf52820/prj_release.conf index 735ed8a3d350..7972a3e07959 100644 --- a/applications/nrf_desktop/configuration/nrf52820dongle_nrf52820/prj_release.conf +++ b/applications/nrf_desktop/configuration/nrf52820dongle_nrf52820/prj_release.conf @@ -46,6 +46,8 @@ CONFIG_BT_RECV_WORKQ_SYS=y CONFIG_BT_GATT_DM_WORKQ_SYS=y # Disable Bluetooth long workqueue to reduce memory consumption CONFIG_BT_LONG_WQ=n +# Don't use BT TX processor thread due to limited RAM. +CONFIG_BT_TX_PROCESSOR_THREAD=n # Limit number of key slots in the PSA Crypto core to reduce memory consumption CONFIG_MBEDTLS_PSA_KEY_SLOT_COUNT=10 diff --git a/applications/nrf_desktop/configuration/nrf52833dk_nrf52820/prj.conf b/applications/nrf_desktop/configuration/nrf52833dk_nrf52820/prj.conf index d9b9d774e9df..3552607a24a6 100644 --- a/applications/nrf_desktop/configuration/nrf52833dk_nrf52820/prj.conf +++ b/applications/nrf_desktop/configuration/nrf52833dk_nrf52820/prj.conf @@ -49,6 +49,8 @@ CONFIG_BT_RECV_WORKQ_SYS=y CONFIG_BT_GATT_DM_WORKQ_SYS=y # Disable Bluetooth long workqueue to reduce memory consumption CONFIG_BT_LONG_WQ=n +# Don't use BT TX processor thread due to limited RAM. +CONFIG_BT_TX_PROCESSOR_THREAD=n # Limit number of key slots in the PSA Crypto core to reduce memory consumption CONFIG_MBEDTLS_PSA_KEY_SLOT_COUNT=10 diff --git a/applications/nrf_desktop/configuration/nrf52833dk_nrf52820/prj_release.conf b/applications/nrf_desktop/configuration/nrf52833dk_nrf52820/prj_release.conf index a616ae5d3bee..94f054523452 100644 --- a/applications/nrf_desktop/configuration/nrf52833dk_nrf52820/prj_release.conf +++ b/applications/nrf_desktop/configuration/nrf52833dk_nrf52820/prj_release.conf @@ -47,6 +47,8 @@ CONFIG_BT_RECV_WORKQ_SYS=y CONFIG_BT_GATT_DM_WORKQ_SYS=y # Disable Bluetooth long workqueue to reduce memory consumption CONFIG_BT_LONG_WQ=n +# Don't use BT TX processor thread due to limited RAM. +CONFIG_BT_TX_PROCESSOR_THREAD=n # Limit number of key slots in the PSA Crypto core to reduce memory consumption CONFIG_MBEDTLS_PSA_KEY_SLOT_COUNT=10 diff --git a/applications/nrf_desktop/configuration/nrf52833dk_nrf52833/prj_dongle_small.conf b/applications/nrf_desktop/configuration/nrf52833dk_nrf52833/prj_dongle_small.conf index 1477d8ae0f82..02dfc7c30c7d 100644 --- a/applications/nrf_desktop/configuration/nrf52833dk_nrf52833/prj_dongle_small.conf +++ b/applications/nrf_desktop/configuration/nrf52833dk_nrf52833/prj_dongle_small.conf @@ -54,6 +54,8 @@ CONFIG_BT_RECV_WORKQ_SYS=y CONFIG_BT_GATT_DM_WORKQ_SYS=y # Disable Bluetooth long workqueue to reduce memory consumption CONFIG_BT_LONG_WQ=n +# Don't use BT TX processor thread due to limited RAM. +CONFIG_BT_TX_PROCESSOR_THREAD=n # Limit number of key slots in the PSA Crypto core to reduce memory consumption CONFIG_MBEDTLS_PSA_KEY_SLOT_COUNT=10 diff --git a/samples/bluetooth/direction_finding_central/prj.conf b/samples/bluetooth/direction_finding_central/prj.conf index f696c4664e63..320d0f9dfbc7 100644 --- a/samples/bluetooth/direction_finding_central/prj.conf +++ b/samples/bluetooth/direction_finding_central/prj.conf @@ -16,3 +16,6 @@ CONFIG_BT_GATT_CLIENT=y CONFIG_BT_DF=y CONFIG_BT_DF_CONNECTION_CTE_RX=y CONFIG_BT_DF_CONNECTION_CTE_REQ=y + +# Don't use BT TX processor thread due to limited RAM. +CONFIG_BT_TX_PROCESSOR_THREAD=n diff --git a/samples/bluetooth/direction_finding_peripheral/prj.conf b/samples/bluetooth/direction_finding_peripheral/prj.conf index 1da0905df11d..5bbdcef3da64 100644 --- a/samples/bluetooth/direction_finding_peripheral/prj.conf +++ b/samples/bluetooth/direction_finding_peripheral/prj.conf @@ -19,3 +19,6 @@ CONFIG_BT_DF_CONNECTION_CTE_RSP=y # Disable AoD Feature (antenna switching) in Tx mode in Host CONFIG_BT_DF_CTE_TX_AOD=n + +# Don't use BT TX processor thread due to limited RAM. +CONFIG_BT_TX_PROCESSOR_THREAD=n diff --git a/subsys/bluetooth/Kconfig b/subsys/bluetooth/Kconfig index 43ae027819de..8dde3f9467ae 100644 --- a/subsys/bluetooth/Kconfig +++ b/subsys/bluetooth/Kconfig @@ -45,6 +45,12 @@ config BT_LONG_WQ_STACK_SIZE default 1800 if (BT_ECC || BT_GATT_CACHING) default 1024 +# Note that some nRF boards have very limited RAM. For these we give the prompt-option to disable +# the BT TX processor thread. +# Disabling the BT TX processor thread may cause deadlocks. +config BT_TX_PROCESSOR_THREAD + prompt "Bluetooth TX processor thread" + rsource "controller/Kconfig" rsource "host_extensions/Kconfig" rsource "cs_de/Kconfig" diff --git a/west.yml b/west.yml index d82f31baec29..81f5188f007b 100644 --- a/west.yml +++ b/west.yml @@ -64,7 +64,7 @@ manifest: # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/modules.html - name: zephyr repo-path: sdk-zephyr - revision: ceabc540fed74d3e1969b78f92dc0fbd7e815a3e + revision: pull/3606/head import: # In addition to the zephyr repository itself, NCS also # imports the contents of zephyr/west.yml at the above