mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-16 19:04:53 +08:00
Cause_tm27_intr() reprogrammed timer 0 of the TX3904 to fire after 20 clicks. That timer is the clock tick, so the macro left its compare register at 20 instead of the clicks per tick, and Clear_tm27_intr() did not restore it. It also made the interrupt arrive 20 clicks later rather than at once. The validation tests which run code from an interrupt depend on the arrival being immediate. They hook the block operation of the scheduler and submit the request from there, so the interrupt has to reach the thread while it intends to block. With the delay the thread was blocked long before, and 245 test steps of ts-validation-no-clock-0 and one of ts-validation-one-cpu-0 checked a state which had already passed. The processor has two software interrupts and the BSP drives them through rtems_interrupt_raise() already, so use one of them. It is pending from the write on, it needs no timer, and it leaves the clock tick alone. Both test suites report no failed step now. The entry overhead which tm27 reports falls from 26 to 7, because the measured path no longer contains the five register writes which armed the timer. Close #5688. Assisted-by: Claude:claude-opus-5 claude-code Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>