Compilation Error when Configuring NRF21540 on NRF5340

I've been using ICMSG's IPC to exchange HCI messages between the netcore and appcore, and using SPI to exchange HCI information between the host and appcore. This setup enables HCI message transfer between the netcore and the host, and it works properly.

However, when I configure the NRF21540 FEM in the netcore, I get an error indicating that mpsl_work_q is undefined in hci_driver.c. I traced the code and found that mpsl_work_q is defined in mpsl_init.c, and it requires CONFIG_MPSL_FEM_ONLY=n. But when CONFIG_FEM=y is set, it automatically selects MPSL_FEM_ONLY.

So it seems like there's a conflict between my HCI and FEM configurations. How can I configure it to ensure both FEM and HCI are enabled at the same time?

Related