NetBurner 3.5.0
PDF Version
 
Timer Capture

Supported Platforms: MODM7AE70 SBE70LC

Timer Counter Capture Example

This example will generate a pulse waveform on Timer 11, and capture the waveform on Timer 7.

For the MODM7AE70: The timer 11 output is on P2.28, and the timer 7 capture is on P1.4. You will need to add a jumper between these two pins. After the capture is complete, the frequency and duty cycle of the captured waveform will be displayed.

For the SBE70LC The timer 11 output is on J1.4, and the timer 2 capture is on J4.6. You will need to add a jumper between these two pins. After the capture is complete, the frequency and duty cycle of the captured waveform will be displayed.

This is a good example to demonstrate how to:

  • Learn the structure of the SAME70 Timer Counter peripheral
  • Produce a pulse output waveform of various frequencies and duty cycles
  • Capture and count waveform pulses
  • Implement a peripheral interrupt service routine

SAME70 Timer Architecture

  • There are a total of 12 16-bit timers, numbered 0 - 11.
  • They are divided up into 4 blocks. Each block is called a Timer Counter: TC0, TC1, TC2, TC3.
  • Each timer within a Timer Counter block is called a Timer Counter Channel. While the timers number from 0 to 11, each Timer Counter Channel within a Timer Counter block is numbered from 0 to 2. For example, Timer Counter Channel 11 is in Timer Counter group TC3, with Timer Counter Channel number 2.
  • While all Timer Counter Channels can be used, not all signal pins are brought out to the headers on the MODM7AE70/SBE70LC.
  • The diagrams in the Timer Counter (TC) section of the SAME70 Reference Manual describe the structure of the Timer Counters.