Skip to content

Comments

fix agc reset on SX126x, SX1276 & LR11x0 chips#1743

Open
weebl2000 wants to merge 7 commits intomeshcore-dev:devfrom
weebl2000:fixagcreset
Open

fix agc reset on SX126x, SX1276 & LR11x0 chips#1743
weebl2000 wants to merge 7 commits intomeshcore-dev:devfrom
weebl2000:fixagcreset

Conversation

@weebl2000
Copy link
Contributor

@weebl2000 weebl2000 commented Feb 19, 2026

  • tried to simply explicitly call sleep briefly to reset AGC -> not sufficient it seems
  • do more thorough reset using Calibrate (0x7F) -> success
  • reset noise_floor so firmware shows accurate values
  • so far it seems to work great on a Heltec v4
  • should work on all SX126x based chips by using Calibrate(0x7F)
  • shoudl work on all LR11x0 based chips by using Calibrate(0x3F)
  • should work on SX1276 chips too, calling sleep there should be sufficient - SX1276's AGC is simpler — just LNA gain stepping. Sleep mode powers down the entire analog frontend, and re-entering RX restarts the AGC from G1 (max gain).
  • default calibration is in 902-928 MHz range, made sure to follow up with actual configured frequency
  • build firmware for yourself here: https://mcimages.weebl.me/?commitId=fixagcreset

fixes #1716 - see discussion there for initial test results

I've referenced SX1262 datasheet to implement the calibration reset.

  • p25 4.3 ,64-65 table 12-1 listing ΣΔ ADC architecture
  • p55 table 9-1 sleep enable vs stdby_rc enable
  • p55 9.2 states which blocks can be calibrated
  • p61 9.2.1 calibrate specific freq
  • p66 warm sleep restores register state confirms we need more aggressive Calibrate(0x7F) reset
  • p73 total calibration time is 3.5 ms and must be launched in STDBY_RC mode

For LR1110 similar implementation, the 'AGC' is completely black boxed behind firmware so you can only reset it by resetting registers.

LR1110 datasheet page 9 section 1.2.1 states:
•Air interface fully compatible with the SX1261/2/8 family

Also see LR1110 user docs

So reset is very similar.

@towerviewcams
Copy link

what boards do you think the AGC doesn't work on? On a V4, I've been watching closely at a terrible site I have with 945Mhz STL microwave and turned off agc.reset.interval and then back on. I think it "might" be working but not sold on that.

@terminalvelocity23
Copy link

what boards do you think the AGC doesn't work on? On a V4, I've been watching closely at a terrible site I have with 945Mhz STL microwave and turned off agc.reset.interval and then back on. I think it "might" be working but not sold on that.

I have reports that it gets stuck on V3 and T114, as well. My DIY node based on ESP32-S3 and E22 900M30S gets affected, too.

@weebl2000 weebl2000 changed the title fix agc reset fix agc reset on SX1262 Feb 19, 2026
@weebl2000 weebl2000 changed the title fix agc reset on SX1262 fix agc reset on SX126x chips Feb 19, 2026
@towerviewcams
Copy link

I figured out why I'm not seeing this AGC problem. Its had me stumped on and off for a couple days. I set my repeaters to Zero on the int.thresh 0

Once I changes this back to default, yep, I can watch my noise floor eventually hit -120 on my V4 and be of course very desensitized.

I tried @weebl2000 test firm builder and in fact it is fixed. also, no current spike on AGC rest every 12 seconds that mine is set for the test.

weebl2000 and others added 5 commits February 21, 2026 15:33
1. warm sleep
2. wake to stdby
3. Calibrate(0x7F) to reset all internal blocks
4. re-apply DIO2 RF / boosted gain & register patch to make sure
everything is as it was
Similar to SX126x but simpler.
@weebl2000 weebl2000 changed the title fix agc reset on SX126x chips fix agc reset on SX126x, SX1276 & LR11x0 chips Feb 21, 2026
@towerviewcams
Copy link

@weebl2000 Your test firm still has the 22 second powersaving delay. Can you update your base 1.13 firm with that fix? I'm testing your AGC fix now but since I'm in a busy area, I'm never sleeping and its draining battery pretty good in our rain for days weather.

@weebl2000
Copy link
Contributor Author

weebl2000 commented Feb 21, 2026

@weebl2000 Your test firm still has the 22 second powersaving delay. Can you update your base 1.13 firm with that fix? I'm testing your AGC fix now but since I'm in a busy area, I'm never sleeping and its draining battery pretty good in our rain for days weather.

the fixagcreset is up-to-date with the meshcore/dev branch. Are you building fixagcreset branch? https://mcimages.weebl.me/?commitId=fixagcreset what branch is the 22 second powersaving delay branch? I can merge that one with this one for you so you can test the combination.

@towerviewcams
Copy link

@weebl2000 the 22 second delay showed up in 1.13 and @IoTThinks Kevin made a hotfix on his github. They also also have powersaving13 as well. I've been testing it on 2, V4 boards and its awesome. It is not merged into the dev branch at this time.

If you could do something temporary with ether the hot fix, that would allow me to test at 3 tower sites tomorrow for work that I'm taking an insurance agent to. All easy access repeaters in town.

The hot fix on easy sky mesh is under Firmware, Testing, PR-1687, : heltec_v4_repeater-002878e.bin and I have that running in addition to stock 1.13 and its perfect. I'm guessing that would be the simplest? All 3 of these sites go numb -120 in just under 24 hrs and this AGC reset fix should be golden to find out really quick!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants