Skip to content

fix(sx1276): Restore channel frequency after RxChainCalibration in TX timeout workaround#1643

Open
GastonDonikian wants to merge 1 commit intoLora-net:masterfrom
the-campos:fix/sx1276-restore-channel-after-tx-timeout
Open

fix(sx1276): Restore channel frequency after RxChainCalibration in TX timeout workaround#1643
GastonDonikian wants to merge 1 commit intoLora-net:masterfrom
the-campos:fix/sx1276-restore-channel-after-tx-timeout

Conversation

@GastonDonikian
Copy link

Summary

Fix a bug in the TX timeout workaround where the channel frequency is not restored after RxChainCalibration().

Problem

In SX1276OnTimeoutIrq(), the TX timeout workaround performs:

  1. SX1276Reset() - resets hardware registers to defaults (frequency registers become 0)
  2. RxChainCalibration() - reads frequency from registers (now 0), performs calibration, then "restores" the 0 value
  3. Continues without restoring the actual channel frequency

After this sequence, the hardware frequency registers are left at 0 (or 868MHz from HF calibration), while SX1276.Settings.Channel still holds the correct value in RAM. Subsequent radio operations will use the wrong frequency.

Solution

Restore the channel frequency from SX1276.Settings.Channel (which is preserved in RAM) after RxChainCalibration() completes.

Related Issues

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