GD32W51x User Manual
960
4. Configure and process the new message.
5. Restore the process before. Restore the content from memory to HAU_INTEN, HAU_CFG
and HAU_CTL registers.
6. Resume DMA channel transmission. Reconfigure the DMA channel to transfer data.
7. Resume the message calculation. Set START bit of HAU_CTL register to 1, to restart a
new message digest calculation.
8. Resume the previous core state. Restore the content from memory to HAU_CTXS 0 ~
HAU_CTXS37 (HAU_CTXS0 ~ HAU_CTXS53 when HMAC operation is to be resumed)
registers.
9. Set DMAE bit of HAU_CTL register to 1, continue the operation from where it suspended
before.
Note:
If the value of NWIF[3:0] bits of HAU_CTL register is 0, it means the context switch
occurs between two data blocks, at the time when the previous block is completely processed,
and the next block has not been pushed into input FIFO, so there is no need to save and
restore HAU_CTXS22 ~ HAU_CTXS37 registers.
28.6.
HAU interrupt
There are two types of interrupt registers in HAU, which are both in HAU_STAT register. In
HAU, the interrupt is used to indicate the situation of the input FIFO and the status of whether
the digest calculation is completed.
Any of interrupts can be enabled or disabled by configuring the HAU interrupt enable register
HAU_INTEN. Value 1 of the register bits enable the interrupts.
28.6.1.
Input FIFO interrupt
When the processing of data pushed in the input FIFO is completed, then DIF is asserted. If
input FIFO interrupt is enabled, when DIF is asserted, input FIFO interrupt will be asserted.
28.6.2.
Calculation completion interrupt
When the digest calculation is finished, then CCF is asserted. If calculation completion
interrupt is enabled, when CCF is asserted, calculation completion interrupt will be asserted.