1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/nrf9160dk: enable periph_rtt and add its configuration

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
This commit is contained in:
Dylan Laduranty 2023-07-06 16:07:00 +02:00
parent 73a3943268
commit f6286d8171
3 changed files with 20 additions and 0 deletions

View File

@ -12,6 +12,7 @@ config BOARD_NRF9160DK
default y
select CPU_MODEL_NRF9160
select HAS_PERIPH_I2C
select HAS_PERIPH_RTT
select HAS_PERIPH_SPI
select HAS_PERIPH_TIMER
select HAS_PERIPH_UART

View File

@ -3,6 +3,7 @@ CPU = nrf9160
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_rtt
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart

View File

@ -119,6 +119,24 @@ static const uart_conf_t uart_config[] = {
#define UART_NUMOF ARRAY_SIZE(uart_config) /**< UART confgiguration NUMOF */
/** @} */
/**
* @name Real time counter configuration
* @{
*/
#ifndef RTT_DEV
#define RTT_DEV (0) /**< NRF_RTC0_S */
#endif
#define RTT_MAX_VALUE (0x00ffffff) /**< 24bit */
#define RTT_MAX_FREQUENCY (32768U) /**< in Hz */
#define RTT_MIN_FREQUENCY (8U) /**< in Hz */
#define RTT_CLOCK_FREQUENCY (32768U) /**< in Hz, LFCLK*/
#ifndef RTT_FREQUENCY
#define RTT_FREQUENCY (1024U) /**< in Hz */
#endif
/** @} */
#ifdef __cplusplus
}
#endif