Skip to content

Comments

LR1121 power correction mechanism#3

Merged
interfer merged 1 commit intoaeronetix_lr1121from
aeronetix_lr1121_5w_power_correction
Jun 20, 2025
Merged

LR1121 power correction mechanism#3
interfer merged 1 commit intoaeronetix_lr1121from
aeronetix_lr1121_5w_power_correction

Conversation

@interfer
Copy link
Collaborator

@interfer interfer commented Jun 19, 2025

Add Frequency-Dependent Power Correction for LR1121 (Aeronetix 5W)

Summary

This PR introduces a frequency-dependent output power correction mechanism for the Aeronetix LR1121 5W target to improve TX's power curve. The driver now applies a correction (in dBm) to the requested output power based on the current transmission frequency, using a table of integer correction values defined in the hardware configuration JSON.

NOTE: Feature supported across all Aeronetix LR-based targets but currently safely tested only on Aeronetix_ESP32_LR1121_5W_TX_via_UART target

Key Changes

  • New freq_power_table in Hardware JSON:
    The hardware configuration now includes a freq_power_table array, mapping frequency (MHz) to integer dBm correction values.
    Example:

    "freq_power_table": [
        [150, -3],
        [160, -3],
        ...
        [750, 0]
    ]
  • Driver Support for Power Correction:

    • The LR1121 driver loads the freq_power_table at startup.
    • During transmission, the driver applies the appropriate correction (with linear interpolation between table points) to the requested output power.
    • All calculations are performed using integer math, as the hardware only supports integer dBm steps.
  • Debug Output:

    • The driver logs the correction process, including the frequency, base power, correction applied, and final power setting.
  • Backward Compatibility:

    • If no freq_power_table is present, the driver defaults to no correction.
    • If "apply_power_correction" set to false , correction won't be used as well.
  • Improved Output Power Accuracy:
    The LR1121’s output power varies with frequency. This mechanism ensures more consistent and accurate output power across the supported frequency range, improving performance and regulatory compliance.

…UART target

Can be turned of with `apply_power_correction: false` in target JSON

Signed-off-by: Dmytro Huz <diman1436@gmail.com>
@interfer interfer force-pushed the aeronetix_lr1121_5w_power_correction branch from 41442c9 to 59f86fe Compare June 19, 2025 20:16
@interfer interfer merged commit 052bf9b into aeronetix_lr1121 Jun 20, 2025
76 of 100 checks passed
@interfer interfer deleted the aeronetix_lr1121_5w_power_correction branch June 25, 2025 16:19
@interfer interfer changed the title LR1121 5w power correction mechanism LR1121 power correction mechanism Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant