Skip to content

Commit f88f83c

Browse files
committed
Fix #429: dont set FSK power < 11 for PAboost mode
1 parent eebb1cd commit f88f83c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/lmic/radio.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ static void configChannel () {
560560
// 1) using RFO: power is -1 to 13 dBm (datasheet implies max OutputPower value is 14 for 13 dBm)
561561
// 2) using PA_BOOST, PaDac = 0x84: power is 2 to 17 dBm;
562562
// use this for 14..17 if authorized
563-
// 3) using PA_BOOST, PaDac = 0x87, OutptuPower = 0xF: power is 20dBm
563+
// 3) using PA_BOOST, PaDac = 0x87, OutputPower = 0xF: power is 20dBm
564564
// and duty cycle must be <= 1%
565565
//
566566
// The general policy is to use the lowest power variant that will get us where we
@@ -626,6 +626,10 @@ static void configPower () {
626626
// we have to re-check eff_pw, which might be too small.
627627
// (And, of course, it might also be too large.)
628628
case LMICHAL_radio_tx_power_policy_paboost:
629+
// It seems that SX127x doesn't like eff_pw 10 when in FSK mode.
630+
if (getSf(LMIC.rps) == FSK && eff_pw < 11) {
631+
eff_pw = 11;
632+
}
629633
rPaDac = SX127X_PADAC_POWER_NORMAL;
630634
rOcp = SX127X_OCP_MAtoBITS(100);
631635
if (eff_pw > 17)

0 commit comments

Comments
 (0)