Simply configure a High level interrupt on any gpio, and add a small delay between the "SIENR |= 1 << intr" and the "SIENF |= 1<<intr" of the actual code.
An interruption will trigger during this small delay.
In fact, this is perfectly logical since when you configure such interrupt with current code:
- you start with ISEL=0, IENR=0 and IENF=0
- you set ISEL=1 <<intr
- you set IENR=1 << intr
At this point, since IENF is still 0, you have configured an level irq on low level, which is the current idle state of the gpio line. => the interruption is triggered.
That's why IENF must be configured BEFORE IENR.
For most of drivers, spurious interrupts are managed and are silent. But in some other drivers, this is a real issue.