2021-05-12 02:04 AM
I'm trying to use the STM32F439ZI HASH accelerator with the following code:
#define INPUT_SIZE 16
static uint8_t hash_test_buffer[224] = {0};
static uint8_t hash_test_output[224];
HASH_Start_DMA(&hhash, hash_test_buffer, INPUT_SIZE, HASH_ALGOSELECTION_SHA256);
HASH_Finish(&hhash, hash_test_output, 1000);
This works fine when INPUT_SIZE is 16 but if I try to increase it then the HASH is not computed and the output is 0.
There is any reason why the size should be at most 16?
Is this the right way to use the HASH functionality with DMA?