SAM D21 Timer/Counter (TC) Overview

Last modified by Microchip on 2023/11/09 09:01

The SAM D21 Timer/Counter (TC) module provides a set of timing and counting-related functionality, such as the generation of periodic waveforms, the capturing of a periodic waveform's frequency/duty cycle, and software timekeeping for periodic operations. TC modules can be configured to use an 8-, 16-, or 32-bit counter size.

Timer/Counter Features

  • Selectable configuration
    • Up to five 16-bit TCs, each configurable as:
    • 8-bit TC with two compare/capture channels
    • 16-bit TC with two compare/capture channels
    • 32-bit TC with two compare/capture channels, by using two TCs
  • Waveform generation
    • Frequency generation
    • Single-slope pulse-width modulation
  • Input capture
    • Event capture
    • Frequency capture
    • Pulse-width capture
  • One input event
  • Interrupts/output events on:
    • Counter overflow/underflow
    • Compare match or capture
  • Internal prescaler
  • Can be used with DMA and to trigger DMA transactions

samd21 tc block diagram general