| Previous | Next |
| ERROR_GPIO_INCOMPATIBLE_CONNECT_MODE | ERROR_CANNOT_SWITCH_RUNLEVEL |
ERROR_GPIO_INTERRUPT_ALREADY_UNMASKED
GPIO interrupt is already unmasked
ERROR_GPIO_INTERRUPT_ALREADY_UNMASKED is Windows system result 15327 (0x00003BDF). The requested state transition is redundant or the driver’s software state disagrees with GpioClx.
This result identifies an interrupt mask-state machine defect. The interrupt is currently enabled for delivery, yet a client attempts another unmask transition.
Where this value belongs
- A resume path restores interrupt state twice.
- Both a common-interrupt routine and device callback unmask the same pin.
- Software mask state is not updated after a successful transition.
This code is about current interrupt state, not connection mode or registration. Repeated unmasking can reveal races that also cause lost masking or unexpected interrupt storms.
Common interpretation mistakes
- It is mishandled when unmask is assumed to be harmless and idempotent.
- It is mishandled when two callbacks share ownership of the transition.
- It is mishandled when software state is changed before hardware completion.
- It is mishandled when mask failure is ignored and later state is guessed.
Diagnostic sequence
- Record pin, bank, and interrupt identity.
- Trace every mask and unmask request with caller and sequence number.
- Compare driver software state with framework and hardware state.
- Check power callbacks for duplicate restoration.
- Serialize transitions and verify completion before updating state.
- Test rapid interrupt, disable, sleep, and resume sequences.
Evidence worth keeping
- preserve interrupt pin and bank.
- preserve mask/unmask caller and sequence.
- preserve software, framework, and hardware mask states.
- preserve power transition and callback order.
- preserve interrupt count around the redundant request.
A sequence trace is essential for it because the final state alone does not identify which caller issued the extra transition.
Correct handling and recovery
Choose one owner for mask-state transitions, synchronize it, and issue unmask only after a confirmed masked state.
Do not immediately repeat unmask. Reconcile the state machine first; if the interrupt is already enabled, continue without another transition only when the contract permits it.
Difference from nearby values
ERROR_GPIO_INCOMPATIBLE_CONNECT_MODE concerns pin connection ownership. Code 15327 concerns the mask state of an already configured interrupt.
Practical scenario
Both EvtDeviceD0Entry and an interrupt-enable callback unmask the same pin after resume. Sequence logging exposes the second call; moving restoration to one callback eliminates code 15327.
Implementation guidance
Represent interrupt state explicitly and update it only after successful framework operations. Stress tests should include concurrent disable and power transitions.
For code 15327, record gpio_unmask_pin, gpio_unmask_sequence, gpio_unmask_caller, gpio_mask_state_before, and gpio_interrupt_count.
References
- Microsoft: System Error Codes 12000–15999
- Microsoft: GpioClx DDI
- Microsoft: GPIO interrupt callbacks
Looking for a different code? Search another status or error code.
