Hello, I’m writing for the UBlox Nora B126, which has an nRF5340 and a Skyworks SKY66405-11 front-end module (FEM). I’m using NCS 2.4.2.
Although I’m able to do simple things from the application core like configure two GPIOs to turn the FEM on and off, this way consumes a prohibitive amount of power, as it doesn’t provide tight enough synchronization with radio usage. I need the FEM to be as soon as the radio starts driving the antenna, and off as soon as it’s done.
I see there’s some documentation on integrating FEMs with MPSL, but I’ve already built a project around the Zephyr BLE Controller using HCI RPMsg sample on the network core. If memory serves, there was some direction finding feature we needed that the SoftDevice under MPSL didn’t support, but I could be mistaken. At any rate I’d like to avoid switching BLE controllers if at all possible.
There’s the Direct support section of these docs that says I don’t need to use MPSL, only set CONFIG_MPSL=y and CONFIG_MPSL_FEM_ONLY=y (I’m also adding CONFIG_MPSL_FEM_SIMPLE_GPIO=y), but the two links for further information in that section are unhelpful.
- The first link to the Front-end module feature docs doesn’t give any info in implementation (configs, device tree overlays for GPIO forwarding, bindings, etc.) so I have no idea how to set it up or what API calls to make.
- The link to the example Bluetooth: Direct Test Mode (along with the other one given in the MPSL docs, Radio test (short-range)) show a very different implementation of FEM control that doesn’t appear to use any MPSL configs at all. These two examples use the FEM abstraction layer with CONFIG_FEM_AL_LIB=y, and I’m unclear on how its functions know which GPIOs to use for switching—are they somehow using the GIPOs specified in the gpio_fwd item in the device tree overlays? That would be child_image/remote_shell/boards/nrf5340dk_nrf5340_cpuapp.overlay in the direct test example, and conf/remote_shell/pin_fwd.dts in the radio test example.
Also, if I understand these examples correctly, their source code runs on the network core, and they use a child image for the application core, right? If that’s case it sounds like to use the FEM with my project in this way, I’d be modifying HCI RPMsg with a device tree overlay to forward GPIOs for switching, and modifying source code to use the FEM_AL methods… but then I have no idea whether/how I’m supposed to set TX power or anything from the application core.
The section Adding support for Skyworks front-end module shows an example of a device tree node representing the FEM and its CTX/CRX pins, but is this supposed to be defined for the application or network core? And what API do I use this node with in order to control the transmission power?
Is it even possible for me to use the MPSL FEM feature while still using the Zephyr BLE Controller via the HCI RPMsg image for the network core, or do I need to modify HCI RPMsg with calls to the FEM_AL methods similar to the two examples? Should I be using FEM_AL at all, or is this just a complete alternative to the higher-level FEM integration methods described in the docs?
If you have a step-by-step description of how to integrate the FEM on an application core and a network core running hci_rpmsg with all the necessary configs, overlays, code snippets, etc. or if there’s an example I missed showing this approach please feel free to ignore any questions above that are irrelevant.
Many thanks