24.6.2.4 Struct tc_config

Configuration struct for a TC instance. This structure should be initialized by the tc_get_config_defaults function before being modified by the user application.

Table 24-7. Members
TypeNameDescription
union tc_config.@1@1

Access the different counter size settings though this configuration member.

enum tc_clock_prescalerclock_prescaler

Specifies the prescaler value for GCLK_TC.

enum gclk_generatorclock_source

GCLK generator used to clock the peripheral.

enum tc_count_directioncount_direction

Specifies the direction for the TC to count.

enum tc_counter_sizecounter_size

Specifies either 8-, 16-, or 32-bit counter size.

booldouble_buffering_enabled

Set to true to enable double buffering write. When enabled any write through tc_set_top_value(), tc_set_compare_value() and will direct to the buffer register as buffered value, and the buffered value will be committed to effective register on UPDATE condition, if update is not locked.

boolenable_capture_on_channel[]

Specifies which channel(s) to enable channel capture operation on.

boolenable_capture_on_IO[]

Specifies which channel(s) to enable I/O capture operation on.

booloneshot

When true, one-shot will stop the TC on next hardware or software re-trigger event or overflow/underflow.

struct tc_pwm_channelpwm_channel[]

Specifies the PWM channel for TC.

enum tc_reload_actionreload_action

Specifies the reload or reset time of the counter and prescaler resynchronization on a re-trigger event for the TC.

boolrun_in_standby

When true the module is enabled during standby.

enum tc_wave_generationwave_generation

Specifies which waveform generation mode to use.

uint8_twaveform_invert_output

Specifies which channel(s) to invert the waveform on. For SAM L21/L22/C20/C21, it's also used to invert IO input pin.