I currently have code to generate pulses on digital pin 2 using TIMER_CLOCK1 which appears to be the fastest clock that I can set in TC_CMR. This generates square(ish) pulses with a minimum width of 2 clock cycles due to the speed of TIMER_CLOCK1 being MCK/2. While 24 nanosecond pulses are nice, I am wondering if anyone knows a way to either use the master clock for this purpose or otherwise redefine TIMER_CLOCK1 with a divisor of 1 instead of 2.
PMC->PMC_PCER0 = _BV(ID_PIOB);
PIOB->PIO_PDR = PIO_PB25;
PIOB->PIO_ABSR = PIO_PB25;
PMC->PMC_PCER0 = _BC(ID_TC0);
TC0->TC_CHANNEL[0].TC_CMR =
TC_CMR_WAVE |
TC_CMR_TCCLKS_TIMER_CLOCK1 | // mck / 2 speed, can I change this?
TC_CMR_WAVSEL_UP_RC |
TC_CMR_ACPA_SET |
TC_CMR_ACPC_CLEAR;
TC0->TC_CHANNEL[0].TC_RA = 0xffff;
TC0->TC_CHANNEL[0].TC_RC = 0xffff + 1;
TC->TC_CHANNEL[0].TC_CCR = TC_CCR_CLKEN | TC_CCR_SWTRG;