Skip to content

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

Open
weebl2000 wants to merge 7 commits intodevfrom
fixagcreset
Open

fix agc reset on SX126x, SX1276 & LR11x0 chips#7
weebl2000 wants to merge 7 commits intodevfrom
fixagcreset

Conversation

@weebl2000
Copy link
Owner

  • 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 meshcore-dev#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.


Mirror of meshcore-dev#1743

weebl2000 and others added 7 commits February 26, 2026 23:16
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.
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.

1 participant