Go to the documentation of this file.
23 #ifndef ASCON_TRNG_STM32_H
24 #define ASCON_TRNG_STM32_H
26 #if defined(USE_HAL_DRIVER)
40 #if defined(STM32F205xx) || defined(STM32F215xx) || defined(STM32F207xx) || \
42 #include "stm32f2xx_hal.h"
43 #define ASCON_TRNG_STM32 hrng
45 #elif defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || \
46 defined(STM32F417xx) || defined(STM32F427xx) || defined(STM32F437xx) || \
47 defined(STM32F429xx) || defined(STM32F439xx) || defined(STM32F401xC) || \
48 defined(STM32F401xE) || defined(STM32F410Tx) || defined(STM32F410Cx) || \
49 defined(STM32F410Rx) || defined(STM32F411xE) || defined(STM32F446xx) || \
50 defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Cx) || \
51 defined(STM32F412Zx) || defined(STM32F412Rx) || defined(STM32F412Vx) || \
52 defined(STM32F413xx) || defined(STM32F423xx)
53 #include "stm32f4xx_hal.h"
54 #define ASCON_TRNG_STM32 hrng
56 #elif defined(STM32F722xx) || defined(STM32F723xx) || defined(STM32F732xx) || \
57 defined(STM32F733xx) || defined(STM32F756xx) || defined(STM32F746xx) || \
58 defined(STM32F745xx) || defined(STM32F765xx) || defined(STM32F767xx) || \
59 defined(STM32F769xx) || defined(STM32F777xx) || defined(STM32F779xx) || \
60 defined(STM32F730xx) || defined(STM32F750xx)
61 #include "stm32f7xx_hal.h"
62 #define ASCON_TRNG_STM32 hrng
64 #elif defined(STM32G0B1xx) || defined(STM32G0C1xx) || defined(STM32G0B0xx) || \
65 defined(STM32G071xx) || defined(STM32G081xx) || defined(STM32G070xx) || \
66 defined(STM32G031xx) || defined(STM32G041xx) || defined(STM32G030xx) || \
67 defined(STM32G051xx) || defined(STM32G061xx) || defined(STM32G050xx)
68 #include "stm32g0xx_hal.h"
69 #define ASCON_TRNG_STM32 hrng
71 #elif defined(STM32G431xx) || defined(STM32G441xx) || defined(STM32G471xx) || \
72 defined(STM32G473xx) || defined(STM32G483xx) || defined(STM32G474xx) || \
73 defined(STM32G484xx) || defined(STM32G491xx) || defined(STM32G4A1xx) || \
75 #include "stm32g4xx_hal.h"
76 #define ASCON_TRNG_STM32 hrng
78 #elif defined(STM32H743xx) || defined(STM32H753xx) || defined(STM32H750xx) || \
79 defined(STM32H742xx) || defined(STM32H745xx) || defined(STM32H745xG) || \
80 defined(STM32H755xx) || defined(STM32H747xx) || defined(STM32H747xG) || \
81 defined(STM32H757xx) || defined(STM32H7B0xx) || defined(STM32H7B0xxQ) || \
82 defined(STM32H7A3xx) || defined(STM32H7B3xx) || defined(STM32H7A3xxQ) || \
83 defined(STM32H7B3xxQ) || defined(STM32H735xx) || defined(STM32H733xx) || \
84 defined(STM32H730xx) || defined(STM32H730xxQ) || defined(STM32H725xx) || \
86 #include "stm32h7xx_hal.h"
87 #define ASCON_TRNG_STM32 hrng
89 #elif defined(STM32L010xB) || defined(STM32L010x8) || defined(STM32L010x6) || \
90 defined(STM32L010x4) || defined(STM32L011xx) || defined(STM32L021xx) || \
91 defined(STM32L031xx) || defined(STM32L041xx) || defined(STM32L051xx) || \
92 defined(STM32L052xx) || defined(STM32L053xx) || defined(STM32L062xx) || \
93 defined(STM32L063xx) || defined(STM32L071xx) || defined(STM32L072xx) || \
94 defined(STM32L073xx) || defined(STM32L082xx) || defined(STM32L083xx) || \
96 #include "stm32l0xx_hal.h"
97 #define ASCON_TRNG_STM32 hrng
99 #elif defined(STM32L412xx) || defined(STM32L422xx) || defined(STM32L431xx) || \
100 defined(STM32L432xx) || defined(STM32L433xx) || defined(STM32L442xx) || \
101 defined(STM32L443xx) || defined(STM32L451xx) || defined(STM32L452xx) || \
102 defined(STM32L462xx) || defined(STM32L471xx) || defined(STM32L475xx) || \
103 defined(STM32L476xx) || defined(STM32L485xx) || defined(STM32L486xx) || \
104 defined(STM32L496xx) || defined(STM32L4A6xx) || defined(STM32L4P5xx) || \
105 defined(STM32L4Q5xx) || defined(STM32L4R5xx) || defined(STM32L4R7xx) || \
106 defined(STM32L4R9xx) || defined(STM32L4S5xx) || defined(STM32L4S7xx) || \
108 #include "stm32l4xx_hal.h"
109 #define ASCON_TRNG_STM32 hrng
111 #elif defined(STM32L552xx) || defined(STM32L562xx)
112 #include "stm32l5xx_hal.h"
113 #define ASCON_TRNG_STM32 hrng
115 #elif defined(STM32WB55xx) || defined(STM32WB5Mxx) || defined(STM32WB50xx) || \
116 defined(STM32WB35xx) || defined(STM32WB30xx) || defined(STM32WB15xx) || \
118 #include "stm32wbxx_hal.h"
119 #define ASCON_TRNG_STM32 hrng
121 #elif defined(STM32WL55xx) || defined(STM32WLE5xx) || defined(STM32WL54xx) || \
122 defined(STM32WLE4xx) || defined(STM32WL5Mxx)
123 #include "stm32wlxx_hal.h"
124 #define ASCON_TRNG_STM32 hrng
126 #elif defined(STM32U575xx) || defined(STM32U585xx) || defined(STM32U595xx) || \
127 defined(STM32U599xx) || defined(STM32U5A5xx) || defined(STM32U5A9xx)
128 #include "stm32u5xx_hal.h"
129 #define ASCON_TRNG_STM32 hrng
131 #elif defined(STM32MP15xx) || defined(STM32MP157Axx) || \
132 defined(STM32MP157Cxx) || defined(STM32MP157Dxx) || \
133 defined(STM32MP157Fxx) || defined(STM32MP153Axx) || \
134 defined(STM32MP153Cxx) || defined(STM32MP153Dxx) || \
135 defined(STM32MP153Fxx) || defined(STM32MP151Axx) || \
136 defined(STM32MP151Cxx) || defined(STM32MP151Dxx) || \
137 defined(STM32MP151Fxx)
138 #include "stm32mp1xx_hal.h"
139 #define ASCON_TRNG_STM32 hrng1
142 #if defined(HAL_RNG_MODULE_ENABLED)
143 #define ASCON_TRNG_STM32_ENABLED 1
147 #define ASCON_TRNG_NONE 1
148 #define ASCON_TRNG_MIXER 1