Memory layout (Bytefield)
Embedded documentation lives and dies on byte offsets. Generating the diagram means the offsets cannot drift from the table.
#What this example shows
A register map with named fields at fixed offsets.
Reserved regions, drawn rather than omitted.
Colour separating configuration from status.
#A worked example
Open it, edit it, or copy the source below.
The source, which you can paste into a new diagram and edit:
#Making it your own
Mark access type on every register: rw, ro, wo, rc. It is what firmware authors check.
Draw reserved regions. Invisible padding is how structs break on a different compiler.
Keep the offsets in one place; regenerate rather than editing both.
#Related
The offsets are computed, not drawn.
