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
The following commit(s) were added to refs/heads/master by this push:
new bc1f0ec34 drivers/crypto_stm32: Fix build for some devices
bc1f0ec34 is described below
commit bc1f0ec34bab156f7c6aaf94fbfe0b2fe316bd02
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Mon Jun 15 13:14:42 2026 +0200
drivers/crypto_stm32: Fix build for some devices
AES1 is valid peripheral for STM32WB
AES is valid for some F4/F7/H7/H5/U5/L4/L1
CRYP is valid for some F4/F7/H7
For hardware that do have AES accelerator code would
not build becuase it assumed that either CRYP instance
is availble or AES1 which is true only for STM32WB devices.
Now additionally code checks if AES instance is present
and used it when neede.
Signed-off-by: Jerzy Kasenberg <[email protected]>
---
hw/drivers/crypto/crypto_stm32/src/crypto_stm32.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/drivers/crypto/crypto_stm32/src/crypto_stm32.c
b/hw/drivers/crypto/crypto_stm32/src/crypto_stm32.c
index a13768edd..30d8f3ae1 100644
--- a/hw/drivers/crypto/crypto_stm32/src/crypto_stm32.c
+++ b/hw/drivers/crypto/crypto_stm32/src/crypto_stm32.c
@@ -239,6 +239,9 @@ stm32_crypto_dev_open(struct os_dev *dev, uint32_t wait,
void *arg)
#ifdef CRYP
__HAL_RCC_CRYP_CLK_ENABLE();
g_hcryp.Instance = CRYP;
+#elif defined(AES)
+ __HAL_RCC_AES_CLK_ENABLE();
+ g_hcryp.Instance = AES;
#else
__HAL_RCC_AES1_CLK_ENABLE();
g_hcryp.Instance = AES1;