Skip to content

Commit 0481c98

Browse files
axelnxpdleach02
authored andcommitted
mcux: connectivity_framework: fix debugging ble application on mcxw72
Sometimes the debugger would crash on mcxw72, this is related to the debugger ability to wake up the NBU core. Adding the correct configuration solves the issue. Signed-off-by: Axel Le Bourhis <[email protected]>
1 parent e0b4343 commit 0481c98

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

mcux/middleware/mcux-sdk-middleware-connectivity-framework/connectivity_framework.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ if(CONFIG_SOC_SERIES_MCXW)
4949
${CMAKE_CURRENT_LIST_DIR}/platform/connected_mcu/configs
5050
)
5151

52+
zephyr_compile_definitions_ifdef(CONFIG_SOC_MCXW727C FWK_KW47_MCXW72_FAMILIES=1)
53+
5254
if(DEFINED CONFIG_SOC_SDKNG_UNSUPPORTED)
5355
include(set_component_osa)
5456
set(CONFIG_USE_component_osa_zephyr true)

mcux/middleware/mcux-sdk-middleware-connectivity-framework/platform/connected_mcu/fwk_platform.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ int PLATFORM_InitNbu(void)
109109
RFMC->RF2P4GHZ_CTRL = rfmc_ctrl;
110110
RFMC->RF2P4GHZ_TIMER |= RFMC_RF2P4GHZ_TIMER_TIM_EN(0x1U);
111111

112+
#if defined(FWK_KW47_MCXW72_FAMILIES) && (FWK_KW47_MCXW72_FAMILIES == 1)
113+
/* Allow the debugger to wakeup the target */
114+
RFMC->RF2P4GHZ_CFG |= RFMC_RF2P4GHZ_CFG_FORCE_DBG_PWRUP_ACK_MASK;
115+
CMC0->DBGCTL &= ~CMC_DBGCTL_SOD_MASK;
116+
#endif
117+
112118
/* Enabling BLE Power Controller (BLE_LP_EN) will automatically start the XTAL
113119
* According to RM, we need to wait for the XTAL to be ready before accessing
114120
* Radio domain ressources.

0 commit comments

Comments
 (0)