Browse Source
Merge pull request #1398 from Socalix/heltecv4-register1
Improve Heltec v4 RX reception with undocumented register patch
pull/1597/head
ripplebiz
4 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
14 additions and
5 deletions
-
src/helpers/radiolib/CustomSX1262.h
-
variants/heltec_v4/platformio.ini
|
|
|
@ -76,6 +76,14 @@ class CustomSX1262 : public SX1262 { |
|
|
|
setRfSwitchPins(SX126X_RXEN, SX126X_TXEN); |
|
|
|
#endif |
|
|
|
|
|
|
|
// for improved RX with Heltec v4
|
|
|
|
#ifdef SX126X_REGISTER_PATCH |
|
|
|
uint8_t r_data = 0; |
|
|
|
readRegister(0x8B5, &r_data, 1); |
|
|
|
r_data |= 0x01; |
|
|
|
writeRegister(0x8B5, &r_data, 1); |
|
|
|
#endif |
|
|
|
|
|
|
|
return true; // success
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -17,18 +17,19 @@ build_flags = |
|
|
|
-D P_LORA_SCLK=9 |
|
|
|
-D P_LORA_MISO=11 |
|
|
|
-D P_LORA_MOSI=10 |
|
|
|
-D P_LORA_PA_POWER=7 ;power en |
|
|
|
-D P_LORA_PA_EN=2 |
|
|
|
-D P_LORA_PA_TX_EN=46 ;enable tx |
|
|
|
-D P_LORA_PA_POWER=7 ; VFEM_Ctrl - Power on GC1109 |
|
|
|
-D P_LORA_PA_EN=2 ; PA CSD - Enable GC1109 |
|
|
|
-D P_LORA_PA_TX_EN=46 ; PA CPS - GC1109 TX PA full(High) / bypass(Low) |
|
|
|
-D PIN_USER_BTN=0 |
|
|
|
-D PIN_VEXT_EN=36 |
|
|
|
-D PIN_VEXT_EN_ACTIVE=LOW |
|
|
|
-D LORA_TX_POWER=10 ;If it is configured as 10 here, the final output will be 22 dbm. |
|
|
|
-D MAX_LORA_TX_POWER=22 ; Max SX1262 output |
|
|
|
-D SX126X_DIO2_AS_RF_SWITCH=true |
|
|
|
-D SX126X_REGISTER_PATCH=1 ; Patch register 0x8B5 for improved RX |
|
|
|
-D SX126X_DIO2_AS_RF_SWITCH=true ; GC1109 CTX is controlled by SX1262 DIO2 |
|
|
|
-D SX126X_DIO3_TCXO_VOLTAGE=1.8 |
|
|
|
-D SX126X_CURRENT_LIMIT=140 |
|
|
|
-D SX126X_RX_BOOSTED_GAIN=1 |
|
|
|
-D SX126X_RX_BOOSTED_GAIN=1 ; In some cases, commenting this out will improve RX |
|
|
|
-D PIN_GPS_RX=38 |
|
|
|
-D PIN_GPS_TX=39 |
|
|
|
-D PIN_GPS_RESET=42 |
|
|
|
|