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

hifive: TIMER0001 test isn't working (it passes instantly instead of taking 3 seconds) #91

Closed
kent-mcleod opened this issue Apr 23, 2023 · 2 comments
Assignees

Comments

@kent-mcleod
Copy link
Member

Can be observed by the logs (with timestamps enabled). The test completes instantly, but it's expected to take 3 seconds.

Sun, 23 Apr 2023 06:11:03 GMT   	<testcase classname="sel4test" name="TIMER0001">
Sun, 23 Apr 2023 06:11:03 GMT   	</testcase>
Sun, 23 Apr 2023 06:11:03 GMT   	<testcase classname="sel4test" name="TIMER0002">
Sun, 23 Apr 2023 06:11:03 GMT   	</testcase>
Sun, 23 Apr 2023 06:11:03 GMT
@Indanz
Copy link
Contributor

Indanz commented Jun 26, 2023

Fixed with this fix in util_libs.

What happened was that the overflow IRQ triggered, but before it is handled pwm_get_time() was called, which also checks and handles overflows in case IRQs got missed. Then the IRQ handler incremented time_h again, making the software think all timers expired immediately.

@lsf37
Copy link
Member

lsf37 commented Jun 27, 2023

Nice!

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

3 participants