Hello all,
I am having issues with the configuration of the FEM nRF21540 on the costum board Fanstel BT840NE with the Enhanced ShockBurst (ESB) protocole.
We are not able to set the PA output TX to a maximum of 20 dBm.
Range tests show that performance decreased compared to our previous chip based on BT840XE (skyworks FEM) set at a TX power of 20 dBm.
We have been testing the esb_ptx and esb_prx examples with the Following configuration in GPIO mode.
prj.conf :
# Enable ESB radio module CONFIG_ESB=y CONFIG_ESB_MAX_PAYLOAD_LENGTH=68 CONFIG_ESB_RX_FIFO_SIZE=10 CONFIG_ESB_TX_FIFO_SIZE=50 CONFIG_ESB_NEVER_DISABLE_TX=y # Enable FEM CONFIG_MPSL=y CONFIG_MPSL_FEM=y CONFIG_MPSL_FEM_NRF21540_GPIO=y CONFIG_MPSL_FEM_NRF21540_GPIO_SPI=n
We are following the instructions provided :
- "enable the MODE pin in devicetree."
- "The state of the remaining control pins should be set in other ways and according to nRF21540 Product Specification."
So we added the following lines to our main.c source code:
#define NRF21540_NODE DT_NODELABEL(nrf_radio_fem) static const struct gpio_dt_spec ant_sel_pin = GPIO_DT_SPEC_GET(NRF21540_NODE, ant_sel_gpios); static const struct gpio_dt_spec mode_pin = GPIO_DT_SPEC_GET(NRF21540_NODE, mode_gpios); static const struct gpio_dt_spec pdn_pin = GPIO_DT_SPEC_GET(NRF21540_NODE, pdn_gpios); /* Configure Antenna select pin */ if (!device_is_ready(ant_sel_pin.port)) { LOG_ERR("Ant_sel init failed (err %d)\n", err); return 0; } gpio_pin_configure_dt(&ant_sel_pin, GPIO_OUTPUT_INACTIVE); gpio_pin_set_dt(&ant_sel_pin, 1); // Antenna 1 /* Configure Mode select pin */ if (!device_is_ready(mode_pin.port)) { LOG_ERR("Mode_sel init failed (err %d)\n", err); return 0; } gpio_pin_configure_dt(&mode_pin, GPIO_OUTPUT_INACTIVE); /* Configure PDN pin */ if (!device_is_ready(pdn_pin.port)) { LOG_ERR("PDN_sel init failed (err %d)\n", err); return 0; } gpio_pin_configure_dt(&pdn_pin, GPIO_OUTPUT_INACTIVE); gpio_pin_set_dt(&pdn_pin, 0); k_msleep(50); gpio_pin_set_dt(&mode_pin, 0); // POUTA Chip production // default value used 20 dBm +/- 0.5 dB k_msleep(50); gpio_pin_set_dt(&pdn_pin, 1); k_msleep(50);
Is this the correct way to get 20dB TX gain from the nRF21540 in GPIO mode ?
Thank you in advance for your response,
best regards,
Yanis