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

Fix hw_timer1_read() for esp32 #2701

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Jan 9, 2024

In IDF >= 5.0 reading the timer1 counter value always returns 0. This is because the low-level HAL call timer_ll_get_counter_value was changed and requires a separate call to timer_ll_trigger_soft_capture.

Timer1 is used for callbacks (HardwareTimer class) and this bug doesn't affect that behaviour since it relies only on the alarm functionality.

Correction: applies only to IDF >= 5.2 (see #2703)

SDK >= 5 requies additional call
@slaff slaff added this to the 5.2.0 milestone Jan 9, 2024
@slaff slaff merged commit 5b9c2a7 into SmingHub:develop Jan 9, 2024
9 of 46 checks passed
@mikee47 mikee47 deleted the fix/esp32-read-timer branch January 9, 2024 16:02
mikee47 pushed a commit to mikee47/Sming that referenced this pull request Jan 9, 2024
Re. SmingHub#2701 call to `timer_ll_trigger_soft_capture` only required for IDF 5.2, as while function signature changed in IDF 5.0 it retains previous behaviour.
slaff pushed a commit that referenced this pull request Jan 10, 2024
Re. #2701 call to `timer_ll_trigger_soft_capture` only required for IDF 5.2, as while function signature changed in IDF 5.0 it retains previous behaviour.

Co-authored-by: mikee47 <[email protected]>
@slaff slaff mentioned this pull request Feb 5, 2024
5 tasks
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.

2 participants