30. Cryp_fifo_status_it
30.1. Function description:
This demo shows how to trigger Input & Output FIFO not almost full Interrupt, algorithm is SM4, algorithm mode is CBC.
Enable global interrupt & register CRYP interrupt.
Enable the related interrupt.
Configure & start the encryption to get ciphertext data, write plaintext data to IN_FIFO after triggering Input FIFO not almost interrupt in interrupt service routine.
Configure & prepare the key for decryption.
Configure & start the decryption, the ciphertext data is comming from encryption result, read out data from OUT_FIFO after triggering output FIFO not almost interrupt in interrupt service routine.
Compare the decryption result with the plaintext to verify the function of encryption and decryption.
Note
For SM4_CBC mode decryption, the key has to be prepared firstly.
30.2. Test result:
After the operation of encryption and decryption, if the decryption result is same as the plaintext data, also successfully trigger and enter interrupt service routine, then print pass, if not print fail.
30.3. IO connection:
None