#include "system.h"
/********************************************************************************/
/***** InitPPI_Timer() *****/
/***** Configure PPI for output, and DMA channel zero for Writes *****/
/********************************************************************************/
void InitPPI_Timer(void)
{
// configure Timer 1 for PPI 1FS GP output mode
// Frequency is such that 1 half of the DAC output buffer is transmitted between pulses.
// Pulse width is 1 PPI clock cycle
// No interrupts assigned to timer.
*pTIMER_DISABLE = TIMDIS1; // disable timer 1
*pTIMER1_PERIOD = Number_of_DAC_channels * Number_of_Samples ;
*pTIMER1_WIDTH = 0x001;
*pTIMER1_CONFIG = PWM_OUT | PULSE_HI | PERIOD_CNT | CLK_SEL | EMU_RUN; // will need to be written again after PPI is initialised and enabled.
asm("ssync;");
}