TI中文支持网
TI专业的中文技术问题搜集分享网站

28377中CLA初始化部分不明白Cla1Task1和cla1Isr1的区别

在28377的例程中,有部分关于CLA的初始化代码,其中不明白Cla1Task1和cla1Isr1的区别,代码如下:

void CLA_initCpu1Cla1(void)
{
// Compute all CLA task vectors
// On Type-1 CLAs the MVECT registers accept full 16-bit task addresses as
// opposed to offsets used on older Type-0 CLAs
EALLOW;
Cla1Regs.MVECT1 = (uint16_t)(&Cla1Task1);
Cla1Regs.MVECT2 = (uint16_t)(&Cla1Task2);
Cla1Regs.MVECT3 = (uint16_t)(&Cla1Task3);
Cla1Regs.MVECT4 = (uint16_t)(&Cla1Task4);
Cla1Regs.MVECT5 = (uint16_t)(&Cla1Task5);
Cla1Regs.MVECT6 = (uint16_t)(&Cla1Task6);
Cla1Regs.MVECT7 = (uint16_t)(&Cla1Task7);
Cla1Regs.MVECT8 = (uint16_t)(&Cla1Task8);

// Enable the IACK instruction to start a task on CLA in software
// for all 8 CLA tasks. Also, globally enable all 8 tasks (or a
// subset of tasks) by writing to their respective bits in the
// MIER register
Cla1Regs.MCTL.bit.IACKE = 1;
Cla1Regs.MIER.all = (M_INT8 | M_INT7);

// Configure the vectors for the end-of-task interrupt for all
// 8 tasks
PieVectTable.CLA1_1_INT = &cla1Isr1;
PieVectTable.CLA1_2_INT = &cla1Isr2;
PieVectTable.CLA1_3_INT = &cla1Isr3;
PieVectTable.CLA1_4_INT = &cla1Isr4;
PieVectTable.CLA1_5_INT = &cla1Isr5;
PieVectTable.CLA1_6_INT = &cla1Isr6;
PieVectTable.CLA1_7_INT = &cla1Isr7;
PieVectTable.CLA1_8_INT = &cla1Isr8;

// Set the adca.1 as the trigger for task 7
DmaClaSrcSelRegs.CLA1TASKSRCSEL2.bit.TASK7 = CLAINTSRCSEL;

// Enable CLA interrupts at the group and subgroup levels
PieCtrlRegs.PIEIER11.all = 0xFFFF;
IER |= (M_INT11 );
EDIS;
}

gaoyang9992006:

Cla1Task1和cla1Isr1是两个不同的概念,第一个是任务,第二个是后面定义的一个中断向量调用指针。。往后面看完就知道了。

//
// cla1Isr1 - CLA1 ISR 1
//__interrupt void cla1Isr1 ()
{//// Acknowledge the end-of-task interrupt for task 1//Interrupt_clearACKGroup(INTERRUPT_ACK_GROUP11);//// Uncomment to halt debugger and stop here//asm(" ESTOP0");
}
赞(0)
未经允许不得转载:TI中文支持网 » 28377中CLA初始化部分不明白Cla1Task1和cla1Isr1的区别
分享到: 更多 (0)