24.6.4.1.2 Function tc_get_config_defaults()

Initializes config with predefined default values.

void tc_get_config_defaults( struct tc_config *const config)

This function will initialize a given TC 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:
  • GCLK generator 0 (GCLK main) clock source

  • 16-bit counter size on the counter

  • No prescaler

  • Normal frequency wave generation

  • GCLK reload action

  • Don't run in standby

  • Don't run on demand for SAM L21/L22/C20/C21

  • No inversion of waveform output

  • No capture enabled

  • No I/O capture enabled for SAM L21/L22/C20/C21

  • No event input enabled

  • Count upward

  • Don't perform one-shot operations

  • No event action

  • No channel 0 PWM output

  • No channel 1 PWM output

  • Counter starts on 0

  • Capture compare channel 0 set to 0

  • Capture compare channel 1 set to 0

  • No PWM pin output enabled

  • Pin and MUX configuration not set

  • Double buffer disabled (if have this feature)

Table 24-13. Parameters
Data directionParameter nameDescription

[out]

config

Pointer to a TC module configuration structure to set