25.6.4.1.2 Function tcc_get_config_defaults()

Initializes config with predefined default values.

void tcc_get_config_defaults( struct tcc_config *const config, Tcc *const hw)

This function will initialize a given TCC configuration structure to a set of known default values. This function should be called on any new instance of the configuration structures before being modified by the user application.

The default configuration is as follows:
  • Don't run in standby

  • When setting top,compare or pattern by API, do double buffering write

  • The base timer/counter configurations:
    • GCLK generator 0 clock source

    • No prescaler

    • GCLK reload action

    • Count upward

    • Don't perform one-shot operations

    • Counter starts on 0

    • Period/top value set to maximum

  • The match/capture configurations:
    • All Capture compare channel value set to 0

    • No capture enabled (all channels use compare function)

    • Normal frequency wave generation

    • Waveform generation polarity set to 0

    • Don't perform ramp on waveform

  • The waveform extension configurations:
    • No recoverable fault is enabled, fault actions are disabled, filter is set to 0

    • No non-recoverable fault state output is enabled and filter is 0

    • No inversion of waveform output

  • No channel output enabled

  • No PWM pin output enabled

  • Pin and MUX configuration not set

Table 25-25. Parameters
Data directionParameter nameDescription

[out]

config

Pointer to a TCC module configuration structure to set

[in]

hw

Pointer to the TCC hardware module