2017-09-19 16:01:27 +08:00
|
|
|
# Kconfig.nrf5 - nRF5 entropy generator driver configuration
|
|
|
|
#
|
2018-02-21 04:24:07 +08:00
|
|
|
# Copyright (c) 2018 Nordic Semiconductor ASA
|
2017-09-19 16:01:27 +08:00
|
|
|
# Copyright (c) 2017 Exati Tecnologia Ltda.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
menuconfig ENTROPY_NRF5_RNG
|
|
|
|
bool "nRF5 RNG driver"
|
2018-02-21 04:24:07 +08:00
|
|
|
depends on ENTROPY_GENERATOR
|
2017-09-19 16:01:27 +08:00
|
|
|
select ENTROPY_HAS_DRIVER
|
|
|
|
help
|
|
|
|
This option enables the RNG peripheral, which is a random number
|
|
|
|
generator, based on internal thermal noise, that provides a
|
|
|
|
random 8-bit value to the host when read.
|
|
|
|
|
2018-02-21 04:24:07 +08:00
|
|
|
if ENTROPY_NRF5_RNG
|
|
|
|
|
2017-09-19 16:01:27 +08:00
|
|
|
config ENTROPY_NRF5_BIAS_CORRECTION
|
|
|
|
bool "Enable bias correction (uniform distribution)"
|
|
|
|
depends on ENTROPY_NRF5_RNG
|
|
|
|
help
|
|
|
|
This option enables the RNG bias correction, which guarantees a
|
|
|
|
uniform distribution of 0 and 1. When this option is enabled, the time
|
|
|
|
to generate a byte cannot be guaranteed.
|
2018-02-21 04:24:07 +08:00
|
|
|
|
|
|
|
config ENTROPY_NRF5_THR_THRESHOLD
|
|
|
|
int "Thread-mode low-water threshold"
|
|
|
|
range 4 255
|
|
|
|
help
|
|
|
|
Low-water threshold in bytes to trigger entropy generation for
|
|
|
|
thread mode consumers.
|
|
|
|
|
|
|
|
config ENTROPY_NRF5_ISR_THRESHOLD
|
|
|
|
int "ISR low-water threshold"
|
|
|
|
range 12 255
|
|
|
|
help
|
|
|
|
Low-water threshold in bytes to trigger entropy generation for
|
|
|
|
ISR consumers.
|
|
|
|
|
|
|
|
config ENTROPY_NRF5_THR_BUF_LEN
|
|
|
|
int "Thread-mode buffer length"
|
|
|
|
range ENTROPY_NRF5_THR_THRESHOLD 255
|
|
|
|
help
|
|
|
|
Buffer length in bytes to pre-store entropy generation for
|
|
|
|
thread mode consumers.
|
|
|
|
|
|
|
|
config ENTROPY_NRF5_ISR_BUF_LEN
|
|
|
|
int "ISR buffer length"
|
|
|
|
range ENTROPY_NRF5_ISR_THRESHOLD 255
|
|
|
|
help
|
|
|
|
Buffer length in bytes to pre-store entropy generation for
|
|
|
|
ISR consumers.
|
|
|
|
|
|
|
|
config ENTROPY_NRF5_PRI
|
|
|
|
int "RNG interrupt priority"
|
|
|
|
depends on ENTROPY_NRF5_RNG
|
|
|
|
range 0 2 if SOC_SERIES_NRF51X
|
|
|
|
range 0 5 if SOC_SERIES_NRF52X
|
|
|
|
default 2 if SOC_SERIES_NRF51X
|
|
|
|
default 5 if SOC_SERIES_NRF52X
|
|
|
|
help
|
|
|
|
nRF5X RNG IRQ priority.
|
|
|
|
|
|
|
|
endif #ENTROPY_NRF5_RNG
|