Texas Instruments Development Kit for TM4C129x,Tiva™ ARM® Cortex™ -M4 Microcontroller DK-TM4C129X DK-TM4C129X 데이터 시트

제품 코드
DK-TM4C129X
다운로드
페이지 2182
Table 15-9. SHA-1 Apply on the Key
Value
Register/Bit Field/Programming Model
Step
-
SHA_DATA_n_IN (i = 0 to 15)
Load the first part of the key. (Here, the key is like a
message.)
0x1
SHA_MODE[2:1] ALGO
Select the SHA-1 hash function.
0x1
SHA_MODE[3] ALGO_CONSTANT
Select a new hash operation.
0x1
SHA_MODE[4] CLOSE_HASH
Close the hash; the key is processed in single pass.
Operational Modes Configuration
SHA/MD5 Polling Mode
Figure 15-2 on page 1079 shows the SHA/MD5 polling mode. SHA/MD5 polling mode uses the following
registers: SHA_IRQSTATUS, SHA_DATA_n_IN, SHA_ODIGEST_A, SHA_DIGEST_COUNT, and
SHA_LENGTH.
Figure 15-2. SHA/MD5 Polling Mode
START
Write the next 64-byte data block
SHA_S_DATA_i_IN[31:0] = 0x-
END
no
yes
no
Is the input buffer ready
to receive the next 64-byte data block?
SHA_S_IRQSTATUS[1] INPUT_READY
== 1
yes
Intermediate result ready?
SHA_S_IRQSTATUS[0]
OUTPUT_READY == 1
Are there more 64-byte
data blocks to be processed?
SHA_S_DIGEST_COUNT[31:0] COUNT
< SHA_S_LENGTH[31:0] LENGTH
Read the result
result = SHA_S_DIGEST_A to
SHA_S_DIGEST_E (for SHA-1)
no
yes
SHA/MD5 Interrupt Mode
The procedure in configures the SHA/MD5 module to work in interrupt-based mode. (For the interrupt
subroutine, see the Interrupt Servicing section.)
Table 15-10. Interrupt Mode
Value
Register/Bit Field/Programming Model
Step
0x1
SHA_SYSCONFIG[2] IT_EN
Enable the interrupt request to the Cortex-A8 MPU INTC.
1079
December 13, 2013
Texas Instruments-Advance Information
Tiva
TM4C129XNCZAD Microcontroller