Hello,
I'm working up an application that uses BLE and Gazella with a 'base' device that typically operates as a gazelle host to communicate to devices and then at the push of a button switches the gazella off and starts up BLE advertising to communicate with a phone app via UART and then switches BLE off and UART on at teh push of another button.
I've merged the BLE UART example and the gazella host example. However I have a strange problem when I start advertising with BLE with the following kernel panic (remember that nrf_gzll_enable() has not been called)
:
ASSERTION FAIL [esf != ((void *)0)] @ WEST_TOPDIR/zephyr/arch/arm/core/aarch32/cortex_m/fault.c:1086
ESF could not be retrieved successfully. Shall never occur.
[00:01:59.438,659] <inf> app: Button 1 pushed
[00:01:59.438,690] <inf> app: Starting BLE advertising
[00:01:59.440,185] <inf> app: Advertising started
[00:01:59.440,277] <inf> app: BLE is initialised, taken from semaaphore, ready to write
[00:01:59.459,716] <err> os: ***** HARD FAULT *****
[00:01:59.459,716] <err> os: Fault escalation (see below)
[00:01:59.459,747] <err> os: ARCH_EXCEPT with reason 4
[00:01:59.459,777] <err> os: r0/a1: 0x00000004 r1/a2: 0x0000043e r2/a3: 0x00000001
[00:01:59.459,777] <err> os: r3/a4: 0x0001d179 r12/ip: 0x00000000 r14/lr: 0x000152ff
[00:01:59.459,808] <err> os: xpsr: 0x41000011
[00:01:59.459,808] <err> os: Faulting instruction address (r15/pc): 0x00026320
[00:01:59.459,869] <err> os: >>> ZEPHYR FATAL ERROR 4: Kernel panic on CPU 0
[00:01:59.459,899] <err> os: Fault during interrupt handling
[00:01:59.459,930] <err> os: Current thread: 0x200028e8 (unknown)
�*** Booting Zephyr OS build v3.3.99-ncs1 ***ng system
The application has been paired down so that there is no gazelle initialisation (not even the headers are included) at all but it still does the kernal panic. However if I remove CONFIG_GZLL=y & CONFIG_GAZELL=y from the proj.conf file then the BLE starts. It seems that included these in the config is stopping the BLE advertising even when the gazelle is not initalised; note that this only happens when BLE advertising is started but I'm not surprised at that. How can I have gazelle host and BLE running in exclusive modes - I don't need them running together but something is causing them to clash even when not initialised.
Thanks.
Cheers,
Neil