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?

  • How did you test GPIO + SPI? 

    The control of the FEM is done automatically by MPSL. Perhaps that's why you can have some success when using the GPIO interface, but not when SPI is involved because the entire SPI peripheral is controlled by MPSL.

    The idea is that MPSL will take care of everything, and you don't have to worry about controlling the FEM directly. You just send requests to MPSL/BLE controller for what TX Power you want to achieve.

    But I see that I am now the one pulling this case off track. If your findings do not match with my guesses, please open a different case if you want to resolve it.

Related