Skip to content

Commit 6b2d2c5

Browse files
committed
Hold GC1109 PA_POWER during deep sleep for LNA RX wake
The GC1109 FEM needs its VFEM_Ctrl pin held HIGH during deep sleep to keep the LNA active, enabling proper RX sensitivity for wake-on-packet. Without this, the LNA is unpowered during sleep and RX wake sensitivity is degraded by ~17dB. Trade-off: ~6.5mA additional sleep current for significantly improved wake-on-packet range.
1 parent f7e92a7 commit 6b2d2c5

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

variants/heltec_tracker_v2/HeltecTrackerV2Board.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ void HeltecTrackerV2Board::begin() {
99
pinMode(P_LORA_PA_POWER, OUTPUT);
1010
digitalWrite(P_LORA_PA_POWER,HIGH);
1111

12+
rtc_gpio_hold_dis((gpio_num_t)P_LORA_PA_POWER);
1213
rtc_gpio_hold_dis((gpio_num_t)P_LORA_PA_EN);
1314
pinMode(P_LORA_PA_EN, OUTPUT);
1415
digitalWrite(P_LORA_PA_EN,HIGH);
@@ -48,7 +49,9 @@ void HeltecTrackerV2Board::begin() {
4849

4950
rtc_gpio_hold_en((gpio_num_t)P_LORA_NSS);
5051

51-
rtc_gpio_hold_en((gpio_num_t)P_LORA_PA_EN); //It also needs to be enabled in receive mode
52+
// Hold GC1109 FEM pins during sleep to keep LNA active for RX wake
53+
rtc_gpio_hold_en((gpio_num_t)P_LORA_PA_POWER);
54+
rtc_gpio_hold_en((gpio_num_t)P_LORA_PA_EN);
5255

5356
if (pin_wake_btn < 0) {
5457
esp_sleep_enable_ext1_wakeup( (1L << P_LORA_DIO_1), ESP_EXT1_WAKEUP_ANY_HIGH); // wake up on: recv LoRa packet

variants/heltec_tracker_v2/platformio.ini

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ 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=4
22-
-D P_LORA_PA_TX_EN=46 ;enable tx
23-
-D LORA_TX_POWER=10 ;If it is configured as 10 here, the final output will be 22 dbm.
24-
-D MAX_LORA_TX_POWER=22 ;Max SX1262 output
20+
-D P_LORA_PA_POWER=7 ; VFEM_Ctrl - GC1109 LDO power enable
21+
-D P_LORA_PA_EN=4 ; CSD - GC1109 chip enable (HIGH=on)
22+
-D P_LORA_PA_TX_EN=46 ; CPS - GC1109 PA mode (HIGH=full PA, LOW=bypass)
23+
-D LORA_TX_POWER=10 ; 10dBm + 11dB gain = ~21dBm output (see gain curve above)
24+
-D MAX_LORA_TX_POWER=22 ; Max SX1262 output -> ~28dBm at antenna
2525
-D SX126X_DIO2_AS_RF_SWITCH=true
2626
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
2727
-D SX126X_CURRENT_LIMIT=140

variants/heltec_v4/HeltecV4Board.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ void HeltecV4Board::begin() {
1010
pinMode(P_LORA_PA_POWER, OUTPUT);
1111
digitalWrite(P_LORA_PA_POWER,HIGH);
1212

13+
rtc_gpio_hold_dis((gpio_num_t)P_LORA_PA_POWER);
1314
rtc_gpio_hold_dis((gpio_num_t)P_LORA_PA_EN);
1415
pinMode(P_LORA_PA_EN, OUTPUT);
1516
digitalWrite(P_LORA_PA_EN,HIGH);
@@ -50,7 +51,9 @@ void HeltecV4Board::begin() {
5051

5152
rtc_gpio_hold_en((gpio_num_t)P_LORA_NSS);
5253

53-
rtc_gpio_hold_en((gpio_num_t)P_LORA_PA_EN); //It also needs to be enabled in receive mode
54+
// Hold GC1109 FEM pins during sleep to keep LNA active for RX wake
55+
rtc_gpio_hold_en((gpio_num_t)P_LORA_PA_POWER);
56+
rtc_gpio_hold_en((gpio_num_t)P_LORA_PA_EN);
5457

5558
if (pin_wake_btn < 0) {
5659
esp_sleep_enable_ext1_wakeup( (1L << P_LORA_DIO_1), ESP_EXT1_WAKEUP_ANY_HIGH); // wake up on: recv LoRa packet

0 commit comments

Comments
 (0)