pico-feedback
pico-feedback copied to clipboard
[Datasheet] Incorrect constants shown for HASH_DEF, HASH_VALUE, and SIGNATURE block items
I've found some errors in the datasheet that should be resolved.
First, in 5.9.2.2. "HASH_DEF item", size_lo is shown to be the constant 0x03. This is not correct; the HASH_DEF item takes up two words, not three. When picotool seal is used to sign an image, the HASH_DEF item it generates has size_lo correctly set to 0x02, and that should be reflected in the datasheet.
Second, the "tag types" for HASH_VALUE and SIGNATURE (sections 5.9.2.3 and 5.9.2.4 respectively) are shown to be 0x09 and 0x4b respectively. These are swapped from their actual values. In pico-sdk, these constants are defined as follows:
#define PICOBIN_BLOCK_ITEM_HASH_VALUE _u(0x4b)
#define PICOBIN_BLOCK_ITEM_SIGNATURE _u(0x09)
Which is the opposite of what's shown in the datasheet.