NetBurner 3.5.0
PDF Version
 
Chaining Timers

Supported Platforms: MODM7AE70 SBE70LC

Timer Chaining Example

This example will chain timers 9, 10 and 11 to create a 48-bit timer. The output pulse waveform will appear on timer 11 as indicated in the pin tables below.

Timer channels 9, 10 and 11 are chained together to create a 48-bit timer. The default settings for the chained timers LineA are P2.28 for the MODM7AE70, and J1.4 for the SBE70LC. A GPIO output is used to output a pulse signal on each timer interrupt. P2.30 for the MODM7AE70, and J1.3 for the SBE70LC.

Warning
P2.28 on the NetBurner MOD-DEV-70 development board also connects to the SD Flash socket. The socket must be empty for this example to run properly, or you should select alternate pins for the timer functions.

See also: Timer Waveform Capture example.

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

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. The table below describes the header pinout.
  • The diagrams in the Timer Counter (TC) section of the SAME70 Reference Manual describe the structure of the Timer Counters.

Timer signals on MODM7AE70 header pins:

Timer 0
   P2.19   LineB TIOB0
   P2.42   Clock TCLK0

 Timer 1
   P2.16   Clock TCLK1

Timer 2
   P2.17   LineA TIOA2
   P2.18   LineB TIOB2
   P2.20   Clock TCLK2

 Timer 5
    P1.7   LineB TIOB5

 Timer 7
    P1.4   LineA TIOA7

 Timer 8
    P1.6   Clock TCLK8     Note: cannot be used if EBI is enabled
    P1.8   LineA TIOA8     Note: cannot be used if EBI is enabled
    P2.6   LineB TIOB8

 Timer 11
    P2.15  Clock TCLK11
    P2.28  LineA TIOA11
    P2.25  LineB TIOB11

Timer signals on SBE70LC header pins:

 Timer 11
    J1.4   LineA TIOA11
    J1.7   LineB TIOB11        
Note
Timer 11 signals are alternate functions to SPI0 MOSI and Clock