30.6.2.4 Counter Mode

The Counter mode is selected by the Mode bit group in the Control A register (CTRLA.MODE). By default, the counter is enabled in the 16-bit counter resolution. Three counter resolutions are available:

  • COUNT8: The 8-bit TC has its own Period register (PER). This register is used to store the period value that can be used as the top value for waveform generation.
  • COUNT16: 16-bit is the default Counter mode. There is no dedicated Period register in this mode.
  • COUNT32: This mode is achieved by pairing two 16-bit TC peripherals. TC4 is paired with TC5, and TC6 is paired with TC7. TC3 does not support 32-bit resolution.

When paired, the TC peripherals are configured using the registers of the even-numbered TC (TC4 or TC6 respectively). The odd-numbered partner (TC5 or TC7 respectively) will act as client, and the Client bit in the Status register (STATUS.SLAVE) will be set. The register values of a client will not reflect the registers of the 32-bit counter. Writing to any of the Client registers will not affect the 32-bit counter. Normal access to the client COUNT and CCx registers is not allowed.