BLE advertising cannot be stop without hardware crash

Hye,

using the nrf 2.4.2 toolchain

i have an unsolvable problem about ble on a nrf52840 based project with imu, i2s strip led, buttons, spi speaker...

i have a classic ble enable process at startup after everthing else initialized (i try disabling all around too... same)

i get a systematic crash on advertising stop with bt_le_adv_stop();

i tried a lot of things about irq conflict or configs...

i tried to put in thread allowing to start and stop advertising few times but a crash anyway 

it just reboot with HARDWARE reset cause (12).

relevant config is for now:

CONFIG_MAIN_STACK_SIZE=8192
CONFIG_HEAP_MEM_POOL_SIZE=16384
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=8192

CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="XXX"
CONFIG_BT_GATT_CLIENT=y
#CONFIG_BT_CTLR_ADVANCED_FEATURES=y
CONFIG_BT_EXT_ADV=y
CONFIG_ZERO_LATENCY_IRQS=y
CONFIG_BT_LL_SW_SPLIT=y
CONFIG_BT_CTLR_ULL_HIGH_PRIO=2
CONFIG_BT_MAX_CONN=1

CONFIG_ISR_STACK_SIZE=1024

CONFIG_BT_DIS=y
CONFIG_BT_DIS_FW_REV=y
CONFIG_BT_DIS_MODEL="xxxxxx"
CONFIG_BT_DIS_MANUF="xxxxxx"
CONFIG_BT_DIS_PNP=n
CONFIG_BT_SETTINGS=y
CONFIG_BT_GATT_CACHING=n
CONFIG_BT_DIS_SETTINGS=y
CONFIG_BT_THROUGHPUT=y

CONFIG_BT_GATT_DM=y
CONFIG_BT_USER_DATA_LEN_UPDATE=y
CONFIG_BT_USER_PHY_UPDATE=y
CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n

CONFIG_BT_BUF_ACL_RX_SIZE=502
CONFIG_BT_ATT_PREPARE_COUNT=2
CONFIG_BT_L2CAP_TX_MTU=498
also the project use FOTA:

CONFIG_MCUMGR=y
CONFIG_IMG_MANAGER=y
CONFIG_MCUMGR_GRP_IMG=y
CONFIG_MCUMGR_GRP_OS=y
CONFIG_MCUMGR_GRP_STAT=y
CONFIG_MCUMGR_GRP_OS_TASKSTAT=y
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_MCUBOOT_GENERATE_CONFIRMED_IMAGE=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU_SPEEDUP=y
CONFIG_DISABLE_FLASH_PATCH=y
thanks
 
Parents Reply
  • bt_le_adv_stop() do not return precisely because it break inside (see code in the screenshot). 
    no exception intercepted by debugger ... vscode or ozone the same... logs just stop and the reboot happend with reboot cause 12 (HARDWARE_RESET). i understand there is not much info but it's a very reproducable case on my side and very problematic. thanks.

Children
Related