The sector list is numerically contiguous, but the bits to write are not contiguous. Good job ST. Fixes: https://github.com/libopencm3/libopencm3/pull/934 Don't see any reason to make public definitions of these sorts of magic numbers, they're completely internal to sector addressing.