diff --git a/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h b/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h index 94eae3fd7..7ec84fc4f 100644 --- a/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h +++ b/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h @@ -54,7 +54,7 @@ * @note The default is @p FALSE. */ #if !defined(STM32_CRY_USE_HASH1) || defined(__DOXYGEN__) -#define STM32_CRY_USE_HASH1 FALSE +#define STM32_CRY_USE_HASH1 TRUE #endif /** @} */ @@ -63,7 +63,7 @@ /*===========================================================================*/ #if (STM32_CRY_USE_CRYP1 == TRUE) || (STM32_CRY_USE_HASH1 == TRUE) || \ - (STM32_CRY_USE_RNG1 == TRUE) || defined (__DOXYGEN__) + defined (__DOXYGEN__) #define STM32_CRY_ENABLED1 TRUE #else #define STM32_CRY_ENABLED1 FALSE @@ -77,10 +77,6 @@ #define STM32_HAS_HASH1 FALSE #endif -#if !defined (STM32_HAS_RNG1) -#define STM32_HAS_RNG1 FALSE -#endif - #if STM32_CRY_USE_CRYP1 && !STM32_HAS_CRYP1 #error "CRYP1 not present in the selected device" #endif @@ -89,12 +85,8 @@ #error "HASH1 not present in the selected device" #endif -#if STM32_CRY_USE_RNG1 && !STM32_HAS_RNG1 -#error "RNG1 not present in the selected device" -#endif - #if !STM32_CRY_ENABLED1 -#error "CRY driver activated but no CRYP or HASH or RNG peripheral assigned" +#error "CRY driver activated but no CRYP or HASH peripheral assigned" #endif /** @@ -135,7 +127,6 @@ #define CRY_LLD_SUPPORTS_HMAC_SHA256 FALSE #define CRY_LLD_SUPPORTS_HMAC_SHA512 FALSE #endif -#endif /** @} */ /*===========================================================================*/ diff --git a/os/hal/ports/STM32/STM32L4xx+/platform.mk b/os/hal/ports/STM32/STM32L4xx+/platform.mk index d86232d53..53288ba6e 100644 --- a/os/hal/ports/STM32/STM32L4xx+/platform.mk +++ b/os/hal/ports/STM32/STM32L4xx+/platform.mk @@ -23,6 +23,7 @@ endif # Drivers compatible with the platform. include $(CHIBIOS)/os/hal/ports/STM32/LLD/ADCv3/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/CANv1/driver.mk +include $(CHIBIOS)/os/hal/ports/STM32/LLD/CRYPv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/DACv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/DMAv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/EXTIv1/driver.mk diff --git a/os/hal/ports/STM32/STM32L4xx+/stm32_registry.h b/os/hal/ports/STM32/STM32L4xx+/stm32_registry.h index 2e0b885b7..9566155fd 100644 --- a/os/hal/ports/STM32/STM32L4xx+/stm32_registry.h +++ b/os/hal/ports/STM32/STM32L4xx+/stm32_registry.h @@ -62,6 +62,15 @@ nvicEnableVector(STM32_RTC_ALARM_NUMBER, STM32_IRQ_EXTI18_PRIORITY); \ } while (false) +#if defined(STM32L4S5xx) || defined(STM32L4S7xx) || defined(STM32L4S9xx) || \ + defined(__DOXYGEN__) +#define STM32_HAS_HASH1 TRUE +#define STM32_HAS_AES1 TRUE +#else +#define STM32_HAS_HASH1 FALSE +#define STM32_HAS_AES1 FALSE +#endif + /*===========================================================================*/ /* STM32L4yyxx+. */ /*===========================================================================*/ diff --git a/os/hal/ports/STM32/STM32L4xx/platform.mk b/os/hal/ports/STM32/STM32L4xx/platform.mk index d261132a5..74d951175 100644 --- a/os/hal/ports/STM32/STM32L4xx/platform.mk +++ b/os/hal/ports/STM32/STM32L4xx/platform.mk @@ -23,6 +23,7 @@ endif # Drivers compatible with the platform. include $(CHIBIOS)/os/hal/ports/STM32/LLD/ADCv3/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/CANv1/driver.mk +include $(CHIBIOS)/os/hal/ports/STM32/LLD/CRYPv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/DACv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/DMAv1/driver.mk include $(CHIBIOS)/os/hal/ports/STM32/LLD/EXTIv1/driver.mk diff --git a/os/hal/ports/STM32/STM32L4xx/stm32_registry.h b/os/hal/ports/STM32/STM32L4xx/stm32_registry.h index a2e911592..a707bab48 100644 --- a/os/hal/ports/STM32/STM32L4xx/stm32_registry.h +++ b/os/hal/ports/STM32/STM32L4xx/stm32_registry.h @@ -62,6 +62,15 @@ nvicEnableVector(STM32_RTC_ALARM_NUMBER, STM32_IRQ_EXTI18_PRIORITY); \ } while (false) +#if defined(STM32L486xx) || defined(STM32L4A6xx) || \ + defined(__DOXYGEN__) +#define STM32_HAS_HASH1 TRUE +#define STM32_HAS_AES1 TRUE +#else +#define STM32_HAS_HASH1 FALSE +#define STM32_HAS_AES1 FALSE +#endif + /*===========================================================================*/ /* STM32L432xx. */ /*===========================================================================*/