Skip to content

Main content

Flash Programming Word Boundary Offset Tool

Compute flash programming word boundary offset from explicit bounded inputs.

Loading tool…

Description

Parse a nonnegative decimal address and divide by wordBytes in 1-256.

Address calculations distinguish an occupied last byte from an exclusive end, and alignment rounds to a defined boundary. Element counts and byte counts are not interchangeable.

Parse a nonnegative decimal address and divide by wordBytes in 1-256.

When to use this tool

Use Flash Programming Word Boundary Offset when you need an explicit address, alignment, page, or transfer-count mapping.

How to use the tool and how it works

  1. Enter address, wordBytes. 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 wordStart, offset. Use the output convention below.

Parse a nonnegative decimal address and divide by wordBytes in 1-256. Return its remainder as offset and subtract that offset for wordStart.1

Input fieldMeaning and unitsAccepted input
addressAddressRequired. Text; maximum UTF-16 length 8192. Integer syntax: optional + or - and 1-128 decimal digits; leading zeros accepted. Apply the sign restriction above.
wordBytesWord BytesRequired. Safe integer; minimum 1; maximum 256.
Output fieldInterpretationReturned shape
wordStartWord StartRequired. Text; maximum UTF-16 length 8192.
offsetOffsetRequired. Safe integer.
json
{
  "input": {
    "address": "4099",
    "wordBytes": 4
  },
  "output": {
    "wordStart": "4096",
    "offset": 3
  }
}

Limitations and assumptions

  • Arbitrary positive word sizes are accepted; flash programming alignment and access permissions are not verified.
  • 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

Validate the resulting span against actual memory bounds and device-specific access and transfer rules.

References

  1. Calculation and input contract: microcontroller/flash-programming-word-boundary-offset — tool.io

Similar or alternative tools