Description
Left-align a logical priority with implementedBits in an eight-bit field by multiplying it by 2^(8 - implementedBits).
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.
Left-align a logical priority with implementedBits in an eight-bit field by multiplying it by 2^(8 - implementedBits).
When to use this tool
Use NVIC Priority Field Left Shift when you need a deterministic fixed-width field or register-state calculation.
How to use the tool and how it works
- Enter priority, implementedBits. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read registerValue. Use the output convention below.
Left-align a logical priority with implementedBits in an eight-bit field by multiplying it by 2^(8 - implementedBits).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| priority | Priority | Required. Safe integer; minimum 0. |
| implementedBits | Implemented Bits | Required. Safe integer; minimum 1; maximum 8. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| registerValue | Register Value | Required. Safe integer. |
{
"input": {
"priority": 3,
"implementedBits": 4
},
"output": {
"registerValue": 48
}
} Limitations and assumptions
- The caller must know the implemented priority width; grouping and preemption behavior are not determined.
- 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
Similar or alternative tools
- Interrupt Priority Preemption Bit Split
Split priority into preemption and subpriority using implementedBits - preemptionBits low bits for the latter.
- Interrupt Nesting Depth Margin
A lower numeric candidate preempts the last active priority; increase depth only when it would preempt and subtract from depthLimit for depthMargin.