Skip to content

Conversation

@bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented Oct 26, 2023

Fixes #780

unsafe {
ets_delay_us(40);
}
ADCI::start_onetime_sample();
Copy link
Contributor

@bugadani bugadani Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't the same sequence as the linked C code: that is a bit_clear(); wait; bit_set() sequence, while this looks like two bit sets. It's interesting how the workaround still seems to work, I wonder what actually needs the delay.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's not the same thing - but works

Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@jessebraham jessebraham merged commit 663cbd9 into esp-rs:main Oct 26, 2023
@bjoernQ bjoernQ deleted the fix/esp32c6-adc branch November 26, 2024 08:43
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.

[ESP32-C6] ADC always returns 0, adc_cal panics

3 participants