SWRU543B January 2019 – June 2025 CC3230S , CC3230SF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
To start a new hash, perform the following steps:
After the configuration is complete, the hash engine can receive the data to process (the INPUT_READY bit is 1 in the SHAMD5_IRQSTATUS register). Data must be written to the 16 × 32-bit SHAMD5_DATA_n_IN registers that provide storage for one 64-byte block of data. Unless the CLOSE_HASH bit is set in the SHAMD5_MODE register, the SHAMD5_DATA_n_IN 64-byte input buffer must be filled. Data can be written by single write transactions to the 16 registers from a processor or by a µDMA transfer.
For a µDMA transfer, the SDAM_EN bit must be set in the SHAMD5_SYSCONFIG register before starting the new hash and the µDMA channel for SHA/MD5 0 data in request must be configured. The µDMA must be configured to the appropriate hash transfer size. A µDMA done is asserted after the last SHAMD5_DATA_n_IN register is filled.
The module detects that a 64-byte block is available, and then moves the data to a working register space for processing and sets the INPUT_READY bit to 1 in the SHAMD5_IRQSTATUS register. If the PDMA_EN bit is set in the SHAMD5_SYSCONFIG register, then a new µDMA request triggers a new block transfer; otherwise, the processor polls the INPUT_READY bit in the SHAMD5_IRQSTATUS register and writes the 16 data words of 32 bits when it equals 1.
This operation repeats until the length of the message to hash is reached. The OUTPUT_READY bit in the SHAMD5_IRQSTATUS register then indicates that the hash operation is complete. If the PIT_EN bit in the SHAMD5_SYSCONFIG register is set, an interrupt (active low) is also generated to indicate the hash completion.