Arduino Zero TCC Capture

Hii Martin,

The program is:

  1. Here I wanted to use Timer 1 which is having 3 channels (T1_CH0; T1_CH1; T1_CH2).
  2. I initialised 2 channels channel 0 and 1.
  3. I have set: channel 0 in waveform mode with master clock (MCK/2 which is 96/2 for due) with trigger on RC compare. After Timer 1 channel 0 is done counting it generates a output TIOA0 and this is fed input to Timer 1 channel 1 .
  4. Set Channel 1 with same parameters as channel 0 (waveform mode, rc compare ) then set the input as TIOA0 instead of master clock.
  5. Then simply print the counter value. (check pg. 861 Clock chaining diagram from datasheet SAM3X / SAM3A Series )