EasyManuals Logo

ST STM32L4 5 Series User Manual

ST STM32L4 5 Series
1830 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #866 background imageLoading...
Page #866 background image
Hash processor (HASH) RM0351
866/1830 DocID024597 Rev 5
Bits 11:8 NBW: Number of words already pushed
This bitfield reflects the number of words in the message that have already been
pushed into the IN FIFO. NBW increments (+1) when a write access is
performed to the HASH_DIN register while DINNE = 1.
It goes to zero when the INIT bit is written to 1 or when a digest calculation starts
(DCAL written to 1 or DMA end of transfer).
If the DMA is not used
0000 and DINNE=0: no word has been pushed into the DIN buffer, i.e. both
HASH_DIN register and IN FIFO are empty.
0000 and DINNE=1: one word has been pushed into the DIN buffer, i.e.
HASH_DIN register contains one word and IN FIFO is empty.
0001: two words have been pushed into the DIN buffer, i.e. HASH_DIN register
and the IN FIFO contain one word each.
...
1111: 16 words have been pushed into the DIN buffer.
If the DMA is used
NBW is the exact number of words that have been pushed into the IN FIFO by
the DMA.
Bit 18 and bit 7 ALGO[1:0]: Algorithm selection
These bits selects the SHA-1, SHA-224, SHA256 or the MD5 algorithm:
00: SHA-1 algorithm selected
01: MD5 algorithm selected
10: SHA224 algorithm selected
11: SHA256 algorithm selected
Note: This selection is only taken into account when the INIT bit is set. Changing
this bit during a computation has no effect.
Bit 6 MODE: Mode selection
This bit selects the HASH or HMAC mode for the selected algorithm:
0: Hash mode selected
1: HMAC mode selected. LKEY must be set if the key being used is longer than
64 bytes.
Note: This selection is only taken into account when the INIT bit is set. Changing
this bit during a computation has no effect.
Bits 5:4 DATATYPE: Data type selection
These bits define the format of the data entered into the HASH_DIN register:
00: 32-bit data. The data written to HASH_DIN are directly used by the hash
processing, without reordering.
01: 16-bit data or half-word. The data written to HASH_DIN are considered as
two half-words, and are swapped before being used by the hash processing.
10: 8-bit data or bytes. The data written to HASH_DIN are considered as four
bytes, and are swapped before being used by the hash processing.
11: bit data or bit-string. The data written to HASH_DIN are considered as 32 bits
(1st bit of the string at position 0), and are swapped before being used by the
hash processing (first bit of the string at position 31).

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32L4 5 Series and is the answer not in the manual?

ST STM32L4 5 Series Specifications

General IconGeneral
BrandST
ModelSTM32L4 5 Series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals