seL4 / sel4test

Test suite for seL4.
http://sel4.systems
Other
24 stars 60 forks source link

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

Closed kent-mcleod closed 1 year ago

kent-mcleod commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Nice!