Which counter is used to trigger the DAC in the Due microcontroller?
In the AT91SAM datasheet, using the DACC mode register to configure the DAC so it'll trigger from a counter, it vaguely states you can use "TIO Output of the Timer Counter Channel 0 ..." as trigger selection to start a conversion. Which TC does it mean? is it TC0 channel 0, TC1 channel 0, or TC2 channel 0?
Also which TIO Output is used for the trigger? TIOA or TIOB, or some other TIO?
I can't seem to be able to trigger the DAC properly from counter activities (without using an interrupt routine which I don't want to do).
I actually got a reply from Atmel tech support as well. This is their official reply:
3 channels of TC0 module and TIOA output should be used.
Following clarification should be updated in the datasheet.
TRGSEL value is 0x01: TIOA output of channel 0 (channel0 of TC0)
TRGSEL value is 0x02: TIOA output of channel 1 (channel1 of TC0)
TRGSEL value is 0x03: TIOA output of channel 2 (channel2 of TC0)
There were a bunch of other vageries and typos in the datasheet as well. It really blows up the development time considerably chasing after these typos.
As you can see, Timer settings have been copy/pasted from MarkT post, DAC is capable to run up to 1.6 Mhz. I will post complete code 100 kHz sine generator after I finish DMA integration.