dezulm -
Do I need DMA to buffer the captured info? Does the DMA need to point to just timer 1 or do I need to setup a DMA buffer for timer 2?
Approximately, how fast is the signal, how precise or accurate must it be measured, and is there a lot of other interrupts or code to run? Must your system capture the timing of every cycle, or can it drop some?
Have you got access to test equipment, e,g, oscilloscope or storage scope, and do you know how to use it? If you have test equipment, it will be much easier to check that stuff is working correctly.
This is my process:
0. Make a test system using a button, or 2nd microcontroller. It'll be much easier to test an artificial signal than a real one. Feed the artificial signal into the pin you plan on using for the 'real' solution to avoid introducing bugs later.
1. Try to make a protoype work with pure software (e.g. digitalRead and time functions), against the artificial signal. It will likely be easiest to solve this way anyway unless the cycle time is under 100 microseconds, or better than 1 microsecond precision is needed, or there are other interrupts (the usual problem is USB, but that can be disabled).
2. If the cycle time is 100us to 10us, consider using a 'pin change' interrupt for a prototype. Look-up the time on a timer. There was a recent thread where someone did that (within last three weeks?)
3. If the cycle time is sub 10us, or sub 100us and there is other interrupt or time-critical activity, it is probably worth using a timer input capture mode, so read the general purpose timer chapter (15) in RM008 (most of it applies to Timer 1 as well as Timer 2).
4. Use the HardwareTimer documentation (http://leaflabs.com/docs/lang/api/hardwaretimer.html#lang-hardwaretimer) to get a timer into a useful state for measurements. The HardwareTimer functions will let you set the count rate of the timer right for timing the signal. Carefully read the documentation because resetting the timer (after a match) needs to be done right. Look at the source of HardwareTimer, and you'll see how to access the timers. The code should match the RM0008 documentation quite closely.
5. Many threads on the forum are from people struggling to use DMA. It adds enough complexity that is seems to be worth avoiding if practical. If the cycle time of the signal is more than 10us, you probably don't need DMA unless there is plenty of other interrupt, or time-critical activity.
Summary
Build an easy to control test rig. Debugging real real-time code can be frustrating and difficult.
If it is something like a RC servo signal (frequency about 50Hz), which is okay with 0.1% precision, and not much else happening (e.g. no USB), then software should be enough.
If the frequency is quite high (10kHz), or there are other interrupts or time-critical stuff happening, but you can service the interrupt, then there is no need for DMA.
If the frequency is faster than 100kHz, and there are other interrupts, and no signal can be lost, then DMA will eventually be needed, but you can get quite a lot working and tested at slower speeds in a test rig.
(Full disclosure: I am not a member of LeafLabs staff)