NCS and nRF21540 with custom protocol

Hello,

First, by "Custom Protocol" I mean that I need to directly access the radio to transmit or receive packets without the L2 layer of Zephyr (IEEE802.15.4 RAW mode).


With this custom protocol, I would like to use the nRF21540 amplifier but I can't make it work correctly.

I'm using the nRF21540DK with NCS v2.0.0 and the proprietary MPSL library but when I activate the logs in the IEEE802.15.4_nrf5.c file, I see that my packets are sent at a power of 8dBm and not 13dBm as I wanted.

I've put those parameters in my conf file:

CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=5
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTA=5
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB_POUTB=5
CONFIG_MPSL_FEM_NRF21540_RX_GAIN_DB=13
CONFIG_MPSL_FEM_DEVICE_CONFIG_254=y
When I put 30 for the TX_GAIN parameters, the log print a tx power of 10 and not 38.
 
I don't understand if I'm correctly using the driver or if anything is really happening.
Do I need to create my own implementation and not the MPSL one ?
Kind regards,
Andrew
Related