cancel
Showing results for 
Search instead for 
Did you mean: 

HASH CR->MODE issue in HAL Library

Simon Sch�pbach
Associate II
Posted on May 12, 2017 at 16:28

I found a issue in the latest HAL Libary.

 * @file    stm32f4xx_hal_hash.h

  * @author  MCD Application Team

  * @version V1.6.0

  * @date    04-November-2016

  * @brief   Header file of HASH HAL module.

Inside HASH->CR register the mode bit is set for a HMAC calculation.

But this bit is never cleared anymore.

Therefore It isn't possible to process a HASH calculation with the DMA if a HMAC calculation is done before.

I suggest to clear this bit inside HAL_HASH_Init()

HASH->CR &= ~HASH_CR_MODE;

Or did I miss something?!?

**EDIT**

It's the same with ALGO mode. After a Md5 calculation it isn't possible to process a SHA-1 calculation anymore.

HASH->CR &= ~HASH_CR_ALGO;

#issue #stm32 #hash
0 REPLIES 0