Skip to content

Commit f7e92a7

Browse files
authored
Merge pull request #1398 from Socalix/heltecv4-register1
Improve Heltec v4 RX reception with undocumented register patch
2 parents 76a46a7 + 31fbb67 commit f7e92a7

2 files changed

Lines changed: 14 additions & 5 deletions

File tree

src/helpers/radiolib/CustomSX1262.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ class CustomSX1262 : public SX1262 {
7676
setRfSwitchPins(SX126X_RXEN, SX126X_TXEN);
7777
#endif
7878

79+
// for improved RX with Heltec v4
80+
#ifdef SX126X_REGISTER_PATCH
81+
uint8_t r_data = 0;
82+
readRegister(0x8B5, &r_data, 1);
83+
r_data |= 0x01;
84+
writeRegister(0x8B5, &r_data, 1);
85+
#endif
86+
7987
return true; // success
8088
}
8189

variants/heltec_v4/platformio.ini

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,19 @@ build_flags =
1717
-D P_LORA_SCLK=9
1818
-D P_LORA_MISO=11
1919
-D P_LORA_MOSI=10
20-
-D P_LORA_PA_POWER=7 ;power en
21-
-D P_LORA_PA_EN=2
22-
-D P_LORA_PA_TX_EN=46 ;enable tx
20+
-D P_LORA_PA_POWER=7 ; VFEM_Ctrl - Power on GC1109
21+
-D P_LORA_PA_EN=2 ; PA CSD - Enable GC1109
22+
-D P_LORA_PA_TX_EN=46 ; PA CPS - GC1109 TX PA full(High) / bypass(Low)
2323
-D PIN_USER_BTN=0
2424
-D PIN_VEXT_EN=36
2525
-D PIN_VEXT_EN_ACTIVE=LOW
2626
-D LORA_TX_POWER=10 ;If it is configured as 10 here, the final output will be 22 dbm.
2727
-D MAX_LORA_TX_POWER=22 ; Max SX1262 output
28-
-D SX126X_DIO2_AS_RF_SWITCH=true
28+
-D SX126X_REGISTER_PATCH=1 ; Patch register 0x8B5 for improved RX
29+
-D SX126X_DIO2_AS_RF_SWITCH=true ; GC1109 CTX is controlled by SX1262 DIO2
2930
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
3031
-D SX126X_CURRENT_LIMIT=140
31-
-D SX126X_RX_BOOSTED_GAIN=1
32+
-D SX126X_RX_BOOSTED_GAIN=1 ; In some cases, commenting this out will improve RX
3233
-D PIN_GPS_RX=38
3334
-D PIN_GPS_TX=39
3435
-D PIN_GPS_RESET=42

0 commit comments

Comments
 (0)