init timer for ppi.c
来自「基于visual dsp++开发环境」· C语言 代码 · 共 24 行
C
24 行
#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;");
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?