Hicham Bouzalmad
Hicham Bouzalmad

Reputation: 1

Lora SX1276, RegPaConfig

I am trying to develop my own LoRa SX1276 library. I can't understand the difference between MaxPower and OutputPower in the RegPaConfig to set transmission power.

Thanks in advance.

register description

Upvotes: 0

Views: 245

Answers (1)

dda
dda

Reputation: 6213

They're used sequentially for the setup:

  • Set PaSelect (0 or 1).
  • Set Pmax (MaxPower = 0 to 7) Pmax = 10.8 + 0.6 * MaxPower So if MaxPower is 7, Pmax = 15
  • Then you calculate Pout, based on PaSelect and OutputPower.
    • If PaSelect = 0 then Pout = Pmax - (15 - OutputPower)
      • So, if OutputPower = 15, Pout = 15 - (15 - 15) --> 15
    • Else if PaSelect = 1 then Pout = 17 - (15 - OutputPower)
      • So, if OutputPower = 15, Pout = 17 - (15 - 15) --> 17

But these calculations are done by the chip. You don't need to do this. You just need to set the bit fields properly, PaSelect, MaxPower, and OutputPower. It's up to the user to set them properly.

If you want, MaxPower is a numerical shortcut the theoretical limit to the power the RF power amplifiers are allowed push. And OutputPower another shortcut to help the chip calculate the actual value.

Default values are 0, 4, 15 for PaSelect, MaxPower and OutputPower. For max performance you set them to 1, 15, 15. But whether that's legal in your country is another story.

Upvotes: 0

Related Questions