Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32 io/analog module: adc_oneshot_unit_init_cfg_t structure not initialized #1322

Closed
linfan68 opened this issue Mar 10, 2024 · 2 comments
Closed

Comments

@linfan68
Copy link

This code does not properly init the structure (to all zero), leads to random initialization failure:

adc_oneshot_unit_init_cfg_t unit_cfg;

Error message:

E (3505) esp_clk_tree: esp_clk_tree_src_get_freq_hz(21): unknown clk src
E (3509) adc_oneshot: adc_oneshot_new_unit(106): clock source not supported

needs to be:

adc_oneshot_unit_init_cfg_t unit_cfg = {};
@phoddie
Copy link
Collaborator

phoddie commented Mar 11, 2024

Good catch. Thank you. I've applied your fix internally and it will propagate to this public repo in the near future.

@phoddie
Copy link
Collaborator

phoddie commented Mar 14, 2024

This fix is now live. Thanks again.

@phoddie phoddie closed this as completed Mar 14, 2024
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

No branches or pull requests

2 participants