Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Bypass LNA configuration

Hi,

On the board that I have, the nRF52840 uses SE2431L Front End Module (FEM) with pa_lna_assist() as found in devzone.nordicsemi.com/.../pa-lna-support-in-s132

We observed that the BLE RSSI received with this nRF52840 degrades after some time in the field. To improve the BLE RSSI or avoid any RSSI degradation, I want to evaluate the option of bypassing the LNA present in SE2431L by using Mode 1 in table 8 of this FEM, i.e., CPS = 0, CSD = 1, CTX = 0 and call pa_lna_assist(CTX, CPS)  
Keeping the PA in the external FEM, is the following code the correct way to configure the pa_lna_assist() such that the LNA is bypassed in the external FEM? or should I simply remove the code for lna_cfg?.

// PA config
opt.common_opt.pa_lna.pa_cfg.active_high = 1; // Set the pin to be active high
opt.common_opt.pa_lna.pa_cfg.enable = 1; // Enable toggling
opt.common_opt.pa_lna.pa_cfg.gpio_pin = gpio_pa_pin; // The GPIO pin to toggle

// LNA config
opt.common_opt.pa_lna.lna_cfg.active_high = 0; // Set the pin to be active high
opt.common_opt.pa_lna.lna_cfg.enable = 0; // Enable toggling
opt.common_opt.pa_lna.lna_cfg.gpio_pin = gpio_lna_pin; // The GPIO pin to toggle

Kindly let me know the correct way to use the external FEM with only the PA and bypass the LNA in the external FEM.

Thanks,
Tilak

Parents
  • Hi TilakL,

    Based on the documentation of the SE2431L FEM, I understand that to bypass LNA:

    - SE2431L CPS should be always low.
    - SE2431L CSD should be high/low depends on when you want the FEM sleep/awake.
    - SE2431L CTX should be high when you you have radio TX.

    Based on the SoftDevice documentation, I initially thought your code is correct.

    However, I ran a quick experiment using the LEDs on my nRF52 DK to see if the CPS SoftDevice PNA pin is actually always low when you configure LNA disabled and found that the pin is not actually always low.

    Without an insight on what the SoftDevice does with a disabled LNA pin, I suggest that you configure the SoftDevice LNA pin to an unused pin and leave it reserved/unused for anything else; and just map CPS to a GPIO pin and configure it to be low with the GPIO API instead.

    The CTX pin should work normally after mapping it to SoftDevice PA pin.

    I will also ask our SoftDevice team on the behavior of disabled LNA pin to make sure there are no risk with the suggestions above.

    Please give that a try and let me know if things work as you expected.

    By the way, if you would entertain my curiosity, why do you think bypassing LNA will improve your RSSI?

    Hieu

Reply
  • Hi TilakL,

    Based on the documentation of the SE2431L FEM, I understand that to bypass LNA:

    - SE2431L CPS should be always low.
    - SE2431L CSD should be high/low depends on when you want the FEM sleep/awake.
    - SE2431L CTX should be high when you you have radio TX.

    Based on the SoftDevice documentation, I initially thought your code is correct.

    However, I ran a quick experiment using the LEDs on my nRF52 DK to see if the CPS SoftDevice PNA pin is actually always low when you configure LNA disabled and found that the pin is not actually always low.

    Without an insight on what the SoftDevice does with a disabled LNA pin, I suggest that you configure the SoftDevice LNA pin to an unused pin and leave it reserved/unused for anything else; and just map CPS to a GPIO pin and configure it to be low with the GPIO API instead.

    The CTX pin should work normally after mapping it to SoftDevice PA pin.

    I will also ask our SoftDevice team on the behavior of disabled LNA pin to make sure there are no risk with the suggestions above.

    Please give that a try and let me know if things work as you expected.

    By the way, if you would entertain my curiosity, why do you think bypassing LNA will improve your RSSI?

    Hieu

Children
  • Hi TilakL,

    Our SoftDevice team answered that if .enabled is set to 0, then the SoftDevice will not configure the pin at all. Therefore, it stays at its default state. The application can (and have to, if it is necessary) configure that pin itself.

    In retrospect, I guess this is the more logical way the API should work. 
    We initially looked at the API and think about it from our context where we are getting the SE2431L to work.
    However, the API is designed for as generic cases as possible. There could be scenarios of FEMs without LNA. In such cases a GPIO pin should not be taken by the SoftDevice for the LNA control purpose.

    Hieu

  • Thank you very much Hieu for your inputs. Your suggestion helped in solving my problem based on preliminary tests :) Here is the rough outline of the main changes, please confirm if the below changes are correctly translated based on your above text: 

    opt.common_opt.pa_lna.lna_cfg.enable = 0; // Bypass external LNA
    err_code = sd_ble_opt_set(BLE_COMMON_OPT_PA_LNA, &opt);
    ...
    nrf_gpio_pin_write(CPS, 0); // Although this statement is not needed, I wanted to ensure that the softDevice did not change anything on the CPS pin.
    To entertain your curiosity, we have another antenna from another radio technology too close to one of the Bluetooth antennas. This probably killed the LNA in the external FEM as we see degradation of BLE RSSI. Hence, the fix of disabling the antenna too close to the other radio technology and bypassing the damaged external LNA, we are back in business. More testing is needed to ensure that this works.
    I think your previous solution works for me. Shall I mark your latest reply as Verify Answer?
    Thanks,
    Tilak
  • Hi Tilak,

    TilakL said:
    nrf_gpio_pin_write(CPS, 0); // Although this statement is not needed, I wanted to ensure that the softDevice did not change

    Actually, this is necessary to ensure CPS stay low. As mentioned in my second reply, the SoftDevice will not configure CPS at all. Thus, if you don't explicitly set it, its state is default uninitialized, not low.

    TilakL said:
    I think your previous solution works for me. Shall I mark your latest reply as Verify Answer?

    It would be great if you could do that. That's the intended flow on DevZone. Thank you. Smiley

    Best regards,

    Hieu

  • Thank you for your support Hieu. The CPS pin was earlier configured which I forgot to include in my previous response Slight smile

    Thanks again,
    Tilak

Related