This is an automated email from the ASF dual-hosted git repository. kasjer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit 2ba18b2f395c7a04fdc9cb004ec3beba5e909c90 Author: Jerzy Kasenberg <[email protected]> AuthorDate: Mon May 11 11:23:56 2026 +0200 stm32/hash: Fix stm32_hash_finish Function stm32_hash_finish check busy flag to see if hash computation was finished. This work on some device H7, F4 but on U5 and H5 busy flag get cleared before hash is available. Now code checks Digest Calculation Complete flag instead and that works on all devices. Signed-off-by: Jerzy Kasenberg <[email protected]> --- hw/drivers/hash/hash_stm32/src/hash_stm32.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/drivers/hash/hash_stm32/src/hash_stm32.c b/hw/drivers/hash/hash_stm32/src/hash_stm32.c index 30058eaa0..de4c03a62 100644 --- a/hw/drivers/hash/hash_stm32/src/hash_stm32.c +++ b/hw/drivers/hash/hash_stm32/src/hash_stm32.c @@ -140,7 +140,8 @@ stm32_hash_finish(struct hash_dev *hash, void *ctx, uint16_t algo, __HAL_HASH_START_DIGEST(); - while (HASH->SR & HASH_FLAG_BUSY) ; + while ((HASH->SR & HASH_FLAG_DCIS) == 0) { + } u32p = (uint32_t *)outbuf; for (i = 0; i < digestsz; i++) {
