Repository navigation
ADC sampling fix - #3112
Merged
pkendall64 merged 5 commits intoJan 23, 2025
Merged
ADC sampling fix#3112
Conversation
pkendall64
force-pushed
the
adc-sampling-fix
branch
from
January 22, 2025 21:42
bf814e1 to
b02dd6f
Compare
JyeSmith
approved these changes
Jan 23, 2025
mha1
approved these changes
Jan 23, 2025
pkendall64
added a commit
to pkendall64/ExpressLRS
that referenced
this pull request
Mar 16, 2025
The ADC should always be allowed when the state is above MODE_STATES
MUSTARDTIGERFPV
pushed a commit
that referenced
this pull request
Mar 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
analogReadfor the joystick (when run on the second core) interferes with the main codepath SPI and/or interrupts, causing the link to skip out of alignment i.e. the packet sequence becomes out-of-step.This manifested itself on 333Hz mode on LR1121 based TX modules with an OLED and Joystick.
Solution
Create a new device to handle the ADC reads for the TX module. The device will guarantee that reads only occur on the rising edge of the
busyTransmitting, once the ISR completes, this is when there is the most "dead time" in the main loop.The PA PowerDetect device has also been changed to use the ADC device to get analog values for power detection.