59 lines
1.9 KiB
Plaintext
59 lines
1.9 KiB
Plaintext
# STM32 entropy generator driver configuration
|
|
|
|
# Copyright (c) 2017 Erwin Rol <erwin@erwinrol.com>
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
DT_COMPAT_ST_STM32_RNG := st,stm32-rng
|
|
|
|
menuconfig ENTROPY_STM32_RNG
|
|
bool "STM32 RNG driver"
|
|
depends on SOC_FAMILY_STM32
|
|
select ENTROPY_HAS_DRIVER
|
|
select USE_STM32_LL_RNG
|
|
default $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_RNG))
|
|
help
|
|
This option enables the RNG processor, which is a entropy number
|
|
generator, based on a continuous analog noise, that provides
|
|
a entropy 32-bit value to the host when read. It is available for
|
|
F4 (except STM32F401 & STM32F411), L4, F7, H7 and G4 series.
|
|
|
|
if ENTROPY_STM32_RNG
|
|
|
|
config ENTROPY_STM32_THR_POOL_SIZE
|
|
int "Thread-mode random number pool size"
|
|
range ENTROPY_STM32_THR_THRESHOLD 256
|
|
default 8
|
|
help
|
|
Buffer length in bytes used to store entropy bytes generated by the
|
|
hardware to make them ready for thread mode consumers.
|
|
Please note, that size of the pool must be a power of 2.
|
|
|
|
config ENTROPY_STM32_THR_THRESHOLD
|
|
int "Thread-mode random number pool low-water threshold"
|
|
range 4 255
|
|
help
|
|
Low water-mark threshold in bytes to trigger entropy generation for
|
|
thread mode consumers. As soon as the number of available bytes in the
|
|
buffer goes below this number hardware entropy generation will be
|
|
started.
|
|
|
|
config ENTROPY_STM32_ISR_POOL_SIZE
|
|
int "ISR-mode random number pool size"
|
|
range ENTROPY_STM32_ISR_THRESHOLD 256
|
|
default 16
|
|
help
|
|
Buffer length in bytes used to store entropy bytes generated by the
|
|
hardware to make them ready for ISR consumers.
|
|
Please note, that size of the pool must be a power of 2.
|
|
|
|
config ENTROPY_STM32_ISR_THRESHOLD
|
|
int "ISR-mode random number pool low-water threshold"
|
|
range 12 255
|
|
help
|
|
Low water-mark threshold in bytes to trigger entropy generation for
|
|
ISR consumers. As soon as the number of available bytes in the
|
|
buffer goes below this number hardware entropy generation will be
|
|
started.
|
|
|
|
endif # ENTROPY_STM32_RNG
|