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

HostTests failing for esp32c3, UP timer not zero #2820

Closed
mikee47 opened this issue Jun 19, 2024 · 2 comments · Fixed by #2837
Closed

HostTests failing for esp32c3, UP timer not zero #2820

mikee47 opened this issue Jun 19, 2024 · 2 comments · Fixed by #2837

Comments

@mikee47
Copy link
Contributor

mikee47 commented Jun 19, 2024

Current develop fails for esp32c3:

>> vs. system time
2706479 Timer1Clock is UP counter
4706622 System time elapsed: 2000000
4706654 Ticks: 0 (4294967258 - 4294967258)
4706696 Ratio: x 0.
4706839 Apparent time: 0
FAIL: abs(int(us - duration)) < 500
FAIL in `void ClockTestTemplate<Clock, TimeType>::execute() [with Clock = Timer1Clock<TIMER_CLKDIV_16>; TimeType = long unsigned int]`

!!!! Test Group 'TimeSource: Timer1Clock/5MHz/32-bit/microseconds' FAILED !!!!

Up-counters are expected to read back as zero, but this shows as 4294967258 == 0xFFFFFFDA.

@mikee47
Copy link
Contributor Author

mikee47 commented Jun 24, 2024

Also fails for esp32:

>> vs. system time
25457812 Timer1Clock is UP counter
27457951 System time elapsed: 2000000
27457992 Ticks: 0 (4294967255 - 4294967255)
27458038 Ratio: x 0.
27458225 Apparent time: 0
assert failed: void ClockTestTemplate<Clock, TimeType>::execute() [with Clock = Timer1Clock<TIMER_CLKDIV_16>; TimeType = long unsigned int] Clocks.cpp:74 (false)

@mikee47
Copy link
Contributor Author

mikee47 commented Jun 25, 2024

Cause: As it's a down-counter, must initialise count value (call timer1_write) as it doesn't auto-wrap. This is just an issue with the test code; not a bug in the driver.

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 a pull request may close this issue.

1 participant