I use ncs1.6.0 to develop on nRF52832DK. The current requirement is to enable PA LNA support on mesh.
I learned how to use FEM driver through this blog. I added the corresponding .overlay file and macro configuration to the nrf\samples\bluetooth\mesh\light_switch example. But an abnormal error occurred when the program was running. I have uploaded the demo to the attachment, roughly as follows:
Add in prj.conf:
# FEM configration (PA/LNA) CONFIG_MPSL=y CONFIG_MPSL_FEM=y CONFIG_MPSL_FEM_SIMPLE_GPIO=y
Add nrf52dk_nrf52832.overlay file:
/ { nrf_radio_fem: pa_lna { compatible = "skyworks,sky66112-11", "generic-fem-two-ctrl-pins"; ctx-gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; crx-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; }; };
Error log:
[13:55:08.527]收←◆I: Bootloader chainload address offset: 0xc000 I: Jumping to the first image slot [13:57:48.709]收←◆*** Booting Zephyr OS build v2.6.0-rc1-ncs1 *** [13:57:50.157]收←◆Initializing... I: 6 Sectors of 4096 bytes I: alloc wra: 0, ff0 I: data wra: 0, 0 [13:58:00.169]收←◆ASSERTION FAIL @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:307 E: r0/a1: 0x00000003 r1/a2: 0x0002d5cc r2/a3: 0x00000001 E: r3/a4: 0x000072cd r12/ip: 0x00000000 r14/lr: 0x0000980b E: xpsr: 0x41000000 E: Faulting instruction address (r15/pc): 0x00009816 E: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0 E: Current thread: 0x20002320 (unknown) E: Resetting system
The reason is that a certain command of hci did not return and the semaphore was blocked.
I don't know what commands the underlying logic sends to hci that cause conflicts with FEM. Does FEM only support BLE?