cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H563ZI - IT based HASH HMAC calculation leads to ErrorCallback

ser
Associate

HW: NUCLEO-H563ZI

Hello, can someone explain the following behavior to me? Is this a bug or am I using the HAL incorrectly?

Thanks a lot.

 

Code snippet

code_snippet.PNG

The result

result.PNG

expected_result.PNG

The result is correct, but the behavior is strange. I receive two error callbacks also.

  • First IRQ
  • Second IRQ 
    • HAL_HASH_InCpltCallback
  • Third IRQ
  • Fourth IRQ
    • HAL_HASH_DgstCpltCallback
    • HAL_HASH_ErrorCallback
    • HAL_HASH_ErrorCallback

 

My analysis

First HAL_HASH_ErrorCallback due to:

  1. state = READY
  2. calling WriteData_IT

irq_handler.PNG

READY state leads to ErrorCallback

write_data.PNG

 

Second HAL_HASH_ErrorCallback due to:

  1. With __HAL_HASH_ENABLE_IT starts the process described above (four IRQ’s)
  2. Then, calling WriteData_IT and the READY state leads to ErrorCallback again

start_it.PNG

2 REPLIES 2
STea
ST Employee

Hello @ser ,

I'm trying to reproduce the issue you are facing .it would be great if you can share the tool versions and Firmware version you are using also i would recommend you try to see the example given in the cubeFrimware and see if you can see any araised errors from the error callbacks .
it would be great as well if you can recover the call stack which lead to the error callback in your case by setting a breakpoint just before you increment the counter.
Regards 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
STea
ST Employee

Hello @ser ,

I confirm this issue, the HAL function is not supposed to arise errors when the configuration and call to the function and the result is calculated correctly.

this has been reported internally. 

Internal ticket number: 188695 (This is an internal tracking number and is not accessible or usable by customers).

BR 

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.