Skip to content

Main content

Microcontroller: Interrupt Pending Enabled Mask Tool

Partition pending interrupt bits by an explicit enable mask at fixed width, without acknowledging or reading hardware interrupts.

Loading tool…

Description

Intersect pending and enabled masks for actionableMask.

A register mask selects bits within a fixed width. Read-clear and write-one-to-clear semantics describe state transitions that differ from ordinary assignment.

Intersect pending and enabled masks for actionableMask.

When to use this tool

Use Microcontroller: Interrupt Pending Enabled Mask when you need a deterministic fixed-width field or register-state calculation.

How to use the tool and how it works

  1. Enter pending, enabled, width. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Intersect pending and enabled masks for actionableMask. Intersect pending with the width-limited complement of enabled for maskedPendingMask.1

Input fieldMeaning and unitsAccepted input
pendingPendingRequired. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
enabledEnabledRequired. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
widthWidthRequired. Safe integer.
Output fieldInterpretationReturned shape
resultResultRequired. Object.
result.actionableMaskActionable MaskCalculated result member: string.
result.maskedPendingMaskMasked Pending MaskCalculated result member: string.
json
{
  "input": {
    "pending": "15",
    "enabled": "5",
    "width": 8
  },
  "output": {
    "result": {
      "actionableMask": "5",
      "maskedPendingMask": "10"
    }
  }
}

Limitations and assumptions

  • These are supplied bit states; priority, global masks, interrupt routing, and concurrent changes are not evaluated.
  • Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use the device's access semantics and account for concurrent hardware changes before applying a register operation.

References

  1. Calculation and input contract: microcontroller/interrupt-pending-enabled-mask — tool.io

Similar or alternative tools