Skip to main content

can_write_block_in_one_transfer

Function can_write_block_in_one_transfer 

Source
const fn can_write_block_in_one_transfer(block: u8) -> bool
Expand description

Whether the chip accepts a single 32-byte Write for the whole block.

Only blocks 1 and 3 of the config zone are fully writable in one shot. Blocks 0 and 2 contain words that the chip refuses to overwrite via Write (factory area, UserExtra, Selector, LockValue, LockConfig) and must be written word-by-word, skipping the non-writable words.

Mirrors the !(zone == ATCA_ZONE_CONFIG && cur_block == 2u) and implicit “block 0 starts at offset 16” logic from CryptoAuthLib’s calib_write_bytes_zone. See lib/calib/calib_basic.c in the reference Microchip library.