I have trouble with starting a timer and I wanted to ask you for help. I'm using the Arduino Due(sam3x8e) and have connected and external temperature sensor to pin 2 (PIOB25) which I have multiplexed to TIOA. I know I have the temperature sensor pulse configured correctly since I have checked with an oscillioscope.
Here is the relevant code I'm using:
I want the timer to be in capture mode and trigger on falling and rising edges, generated from the temperature sensor, but so far it doesn't work.
It doesn't seem to start and I never seem to get into the TC0_Handler().
I want to use Timer_clock1 and according to the attached picture, I figure that I should use channel 1.
When I read the TC Status Register, the clock started bit is still 0. This is a problem I thought that maybe I'm using the wrong channels or the clock cannot start with the current config.
I've been stuck with this for hours and I would greatly appreciated your help and insight.
Thanks in advance,