Files

18 lines
819 B
Markdown

# FC07 — real external IRQ and semaphore handoff
This card drives Hazard3 external IRQ input 5 through testbench MMIO. The
external vector enters the official FreeRTOS full-context trap path, switches to
`xISRStack`, calls an application ISR and returns through the context selected
by `portYIELD_FROM_ISR()`.
The ISR clears the hardware source before `xSemaphoreGiveFromISR()`. Because a
priority-3 waiter is blocked while a priority-2 stimulus is interrupted,
`xHigherPriorityTaskWoken` becomes `pdTRUE`. Evidence E07 proves that the waiter
runs before E08, where the interrupted stimulus continues after its MMIO store.
```sh
make check
python3 /home/user/dev/workspace/stem/tools/card-layouts/tools/build_freertos_c_card.py .
python3 /home/user/dev/workspace/stem/tools/card-layouts/tools/render_card.py .
```