Loading...
Searching...
No Matches

ztimer default configuration More...

Detailed Description

ztimer default configuration

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e

Definition in file config.h.

#include "board.h"
#include "periph_conf.h"
#include "ztimer.h"
+ Include dependency graph for config.h:

Go to the source code of this file.

#define CONFIG_ZTIMER_USEC_TYPE_PERIPH_TIMER   (1)
 
#define CONFIG_ZTIMER_USEC_DEV   (TIMER_DEV(0))
 Default timer device for ZTIMER_USEC.
 
#define CONFIG_ZTIMER_LPTIMER_WIDTH   (32)
 Default width of ZTIMER_LPTIMER.
 
#define CONFIG_ZTIMER_USEC_MIN   (10)
 ZTIMER_USEC optimal minimum value for ztimer_set()
 
#define CONFIG_ZTIMER_USEC_WIDTH   (32)
 ZTIMER_USEC counter object width.
 
#define CONFIG_ZTIMER_USEC_BASE_FREQ   (1000000LU)
 The frequency of ZTIMER_USEC_BASE (base ztimer for ZTIMER_USEC)
 
#define CONFIG_ZTIMER_MSEC_BASE_FREQ   (CONFIG_ZTIMER_USEC_BASE_FREQ)
 The frequency of ZTIMER_MSEC_BASE (base ztimer for ZTIMER_MSEC)
 
#define CONFIG_ZTIMER_TIMER_BLOCK_PM_MODE   ZTIMER_CLOCK_NO_REQUIRED_PM_MODE
 The minimum pm mode required for ZTIMER_TIMER to run.
 
#define CONFIG_ZTIMER_LPTIMER_BLOCK_PM_MODE   ZTIMER_CLOCK_NO_REQUIRED_PM_MODE
 The minimum pm mode required for ZTIMER_LPTIMER to run.
 
#define CONFIG_ZTIMER_RTT_BLOCK_PM_MODE   ZTIMER_CLOCK_NO_REQUIRED_PM_MODE
 The minimum pm mode required for ZTIMER_RTT to run.
 
#define CONFIG_ZTIMER_RTC_BLOCK_PM_MODE   ZTIMER_CLOCK_NO_REQUIRED_PM_MODE
 The minimum pm mode required for ZTIMER_RTC to run.
 
#define CONFIG_ZTIMER_USEC_ADJUST_CLOCK_START   0
 An offset for ZTIMER_USEC allowing to compensate for the offset introduced by turning on the underlying peripheral.
 
#define CONFIG_ZTIMER_USEC_ADJUST_SET   0
 An offset for ZTIMER_USEC allowing to compensate for the offset of ztimer_set().
 
#define CONFIG_ZTIMER_USEC_ADJUST_SLEEP   0
 An offset for ZTIMER_USEC allowing to compentsate for the offset of ztimer_sleep().
 
#define CONFIG_ZTIMER_AUTO_ADJUST_SETTLE   0
 Some MCUs clocks need some warm-up time during which timing is inaccurate.
 

Macro Definition Documentation

◆ CONFIG_ZTIMER_AUTO_ADJUST_SETTLE

#define CONFIG_ZTIMER_AUTO_ADJUST_SETTLE   0

Some MCUs clocks need some warm-up time during which timing is inaccurate.

This can be a hindrance when using the ztimer_auto_adjust module.

Warning
This value will increase the boards start-up time

Definition at line 198 of file config.h.

◆ CONFIG_ZTIMER_LPTIMER_BLOCK_PM_MODE

#define CONFIG_ZTIMER_LPTIMER_BLOCK_PM_MODE   ZTIMER_CLOCK_NO_REQUIRED_PM_MODE

The minimum pm mode required for ZTIMER_LPTIMER to run.

Definition at line 128 of file config.h.

◆ CONFIG_ZTIMER_LPTIMER_WIDTH

#define CONFIG_ZTIMER_LPTIMER_WIDTH   (32)

Default width of ZTIMER_LPTIMER.

Definition at line 68 of file config.h.

◆ CONFIG_ZTIMER_MSEC_BASE_FREQ

#define CONFIG_ZTIMER_MSEC_BASE_FREQ   (CONFIG_ZTIMER_USEC_BASE_FREQ)

The frequency of ZTIMER_MSEC_BASE (base ztimer for ZTIMER_MSEC)

Definition at line 110 of file config.h.

◆ CONFIG_ZTIMER_RTC_BLOCK_PM_MODE

#define CONFIG_ZTIMER_RTC_BLOCK_PM_MODE   ZTIMER_CLOCK_NO_REQUIRED_PM_MODE

The minimum pm mode required for ZTIMER_RTC to run.

Definition at line 149 of file config.h.

◆ CONFIG_ZTIMER_RTT_BLOCK_PM_MODE

#define CONFIG_ZTIMER_RTT_BLOCK_PM_MODE   ZTIMER_CLOCK_NO_REQUIRED_PM_MODE

The minimum pm mode required for ZTIMER_RTT to run.

Definition at line 138 of file config.h.

◆ CONFIG_ZTIMER_TIMER_BLOCK_PM_MODE

#define CONFIG_ZTIMER_TIMER_BLOCK_PM_MODE   ZTIMER_CLOCK_NO_REQUIRED_PM_MODE

The minimum pm mode required for ZTIMER_TIMER to run.

Definition at line 120 of file config.h.

◆ CONFIG_ZTIMER_USEC_ADJUST_CLOCK_START

#define CONFIG_ZTIMER_USEC_ADJUST_CLOCK_START   0

An offset for ZTIMER_USEC allowing to compensate for the offset introduced by turning on the underlying peripheral.

Note
This value can be measured with the tests/sys/ztimer_ondemand_benchmark tool.

This value should be configured in the board.h.

Definition at line 163 of file config.h.

◆ CONFIG_ZTIMER_USEC_ADJUST_SET

#define CONFIG_ZTIMER_USEC_ADJUST_SET   0

An offset for ZTIMER_USEC allowing to compensate for the offset of ztimer_set().

It can be measured with ztimer_overhead_set()

This value should be configured in the board.h.

Definition at line 174 of file config.h.

◆ CONFIG_ZTIMER_USEC_ADJUST_SLEEP

#define CONFIG_ZTIMER_USEC_ADJUST_SLEEP   0

An offset for ZTIMER_USEC allowing to compentsate for the offset of ztimer_sleep().

Note
As internally ztimer_sleep() uses ztimer_set() CONFIG_ZTIMER_USEC_ADJUST_SET should be tuned before.

This value should be configured in the board.h.

Definition at line 187 of file config.h.

◆ CONFIG_ZTIMER_USEC_BASE_FREQ

#define CONFIG_ZTIMER_USEC_BASE_FREQ   (1000000LU)

The frequency of ZTIMER_USEC_BASE (base ztimer for ZTIMER_USEC)

Definition at line 101 of file config.h.

◆ CONFIG_ZTIMER_USEC_DEV

#define CONFIG_ZTIMER_USEC_DEV   (TIMER_DEV(0))

Default timer device for ZTIMER_USEC.

Definition at line 61 of file config.h.

◆ CONFIG_ZTIMER_USEC_MIN

#define CONFIG_ZTIMER_USEC_MIN   (10)

ZTIMER_USEC optimal minimum value for ztimer_set()

When scheduling an ISR every timer will be set to: max(CONFIG_ZTIMER_USEC_MIN, value).

This value only applies if the counter object used for ZTIMER_USEC is periph_timer. This is supposed to be defined per-device in e.g., board.h.

Definition at line 81 of file config.h.

◆ CONFIG_ZTIMER_USEC_TYPE_PERIPH_TIMER

#define CONFIG_ZTIMER_USEC_TYPE_PERIPH_TIMER   (1)

Definition at line 35 of file config.h.

◆ CONFIG_ZTIMER_USEC_WIDTH

#define CONFIG_ZTIMER_USEC_WIDTH   (32)

ZTIMER_USEC counter object width.

Definition at line 93 of file config.h.