Skip to content

Conversation

@weebl2000
Copy link
Contributor

@weebl2000 weebl2000 commented Feb 8, 2026

Summary

  • Use rtc_gpio_hold_en to latch PA_POWER (LDO) and PA_EN (CSD) HIGH during deep sleep, keeping the GC1109 LNA powered for wake-on-packet RX
  • Skip these pins in the blanket RTC hold release on wake (initDeepSleep)
  • Release them in SX126xInterface::init() after setting GPIO registers HIGH first, avoiding a power glitch
  • Add 1ms LDO startup delay on cold boot before driving CSD/CPS, per GC1109 power-on sequence requirement (TLV75733P tSTR ~550us)
  • Applies to Heltec V4 and Heltec Wireless Tracker V2

Background

Previously, the GC1109 FEM power pins used weak internal pull-ups (gpio_pullup_en) during deep sleep, which is less reliable than explicitly latching the pad state. Additionally, SX126xInterface::sleep() sets PA_EN LOW before enableLoraInterrupt() re-enables it, creating a window where the GC1109 could lose power.

The blanket rtc_gpio_hold_dis loop in initDeepSleep() also released these pins before SX126xInterface::init() had a chance to set them HIGH, causing a brief power glitch on every deep sleep wake.

Without this fix, the GC1109 LNA could be unpowered during sleep, degrading RX wake sensitivity by ~17dB.

The TLV75733P LDO has a startup time (tSTR) of ~550us. On cold boot, PA_EN (CSD) was being driven HIGH only ~12.5us after PA_POWER, before the LDO output had stabilised. The GC1109 datasheet requires "VBAT must be prior to CSD/CPS/CTX for the power on sequence". On deep sleep wake the LDO is held on via RTC latch, so no delay is needed.

Trade-off: ~1.2mA additional deep sleep current for significantly improved wake-on-packet range.

Reference: meshcore-dev/MeshCore#1600
Reference: #9029 (comments by @compumike, @ascendr, @lindorffs)

Test plan

  • Flash Heltec V4, enable ROUTER role (triggers deep sleep with LoRa wake)
  • Verify wake-on-packet works at expected range
  • Verify TX still works correctly after wake
  • Measure deep sleep current (~1.2mA extra expected with LNA active)
  • Verify no regression on cold boot (1ms delay is negligible)
  • Confirm normal RX/TX operation after cold boot

@github-actions github-actions bot added the hardware-support Hardware related: new devices or modules, problems specific to hardware label Feb 8, 2026
@weebl2000 weebl2000 force-pushed the fix/gc1109-deep-sleep-rtc-hold branch 2 times, most recently from b1c62f9 to 836a348 Compare February 11, 2026 02:00
Use rtc_gpio_hold_en to latch PA_POWER (LDO) and PA_EN (CSD) HIGH
during deep sleep so the GC1109 LNA remains powered for wake-on-packet
RX. Previously these pins used weak pull-ups which could lose state.

On deep sleep wake, skip these pins in the blanket RTC hold release and
instead release them in SX126xInterface::init() after GPIO registers are
set HIGH first, avoiding a power glitch on the GC1109.

Trade-off: ~6.5mA additional deep sleep current for significantly
improved wake-on-packet RX sensitivity (~17dB).

Reference: meshcore-dev/MeshCore#1600
TLV75733P LDO has ~550us startup time (datasheet tSTR). On cold boot,
wait 1ms for VBAT to stabilise before driving CSD/CPS, per GC1109
power-on sequence requirement. On deep sleep wake the LDO is held on
via RTC latch so no delay is needed.
@weebl2000 weebl2000 force-pushed the fix/gc1109-deep-sleep-rtc-hold branch from 836a348 to db16a06 Compare February 11, 2026 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hardware-support Hardware related: new devices or modules, problems specific to hardware

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant