1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-22 13:03:54 +01:00
RIOT/boards/common/nrf52/include/cfg_rtt_default.h
mguetschow 99cd4617a5
Merge pull request #21743 from BOZHENG001/fix-rtt
nrf52/cfg_rtt_default: fix rtt min offset
2025-09-30 20:16:13 +00:00

51 lines
1.0 KiB
C

/*
* SPDX-FileCopyrightText: 2018 Inria
* SPDX-License-Identifier: LGPL-2.1-only
*/
#pragma once
/**
* @ingroup boards_common_nrf52
* @{
*
* @file
* @brief Default RTT configuration for nRF52 based boards
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*
*/
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name Real time counter configuration
* @{
*/
#ifndef RTT_DEV
#define RTT_DEV (1) /* NRF_RTC1 */
#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*/
/**
* Default offset of 2 ticks is not enough, see figures 8 and 9 in
* https://docs.nordicsemi.com/bundle/ps_nrf52840/page/rtc.html.
*/
#define RTT_MIN_OFFSET (3U)
#ifndef RTT_FREQUENCY
#define RTT_FREQUENCY (1024U) /* in Hz */
#endif
/** @} */
#ifdef __cplusplus
}
#endif
/** @} */