各位DSP的高手:
节日快乐!
本人最近在学习 TI 的 f2812,主要用于AD采样,其中中断控制用EVA进行处理。但是,在配置的时候发现问题:
目前,我的周期中断配置按如下函数去写。
void eva_config()
{
// Configure EVA
// Assumes EVA Clock is already enabled in InitSysCtrl();
EvaRegs.GPTCONA.all = 0x0000;
EvaRegs.GPTCONA.bit.T1TOADC= 2; // Enable EVASOC in EVA
EvaRegs.T1CMPR = 0x0000; // Setup T1 compare value这句有必要配置吗?
EvaRegs.T1PR = 0x4b; // Setup period register
EvaRegs.EVAIMRA.bit.T1PINT = 0; // Mask the period interrupt
EvaRegs.EVAIFRA.bit.T1PINT = 1; // Reset the period interrupt flag
void eva_config()
{
// Configure EVA
// Assumes EVA Clock is already enabled in InitSysCtrl();
EvaRegs.GPTCONA.all = 0x0000;
EvaRegs.GPTCONA.bit.T1TOADC= 2; // Enable EVASOC in EVA
EvaRegs.T1PR = 0x4b; // Setup period register
EvaRegs.EVAIMRA.bit.T1PINT = 0; // Mask the period interrupt
EvaRegs.EVAIFRA.bit.T1PINT = 1; // Reset the period interrupt flag
void eva_config()
{
// Configure EVA
// Assumes EVA Clock is already enabled in InitSysCtrl();
EvaRegs.GPTCONA.all = 0x0000;
EvaRegs.GPTCONA.bit.T1TOADC= 2; // Enable EVASOC in EVA
EvaRegs.T1CMPR = 0x0000; // Setup T1 compare value这句有必要配置吗?
EvaRegs.T1PR = 0x4b; // Setup period register
EvaRegs.EVAIMRA.bit.T1PINT = 0; // Mask the period interrupt
EvaRegs.EVAIFRA.bit.T1PINT = 1; // Reset the period interrupt flag