This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

如何让CLA与CPU同时读取 ADC 结果寄存器的值?



我是这样做的:

1.借用例程Example_2803xClaAdc,此例程已经写好将ADC中的值通过CLA读取,并且存储在结构体中。

2.在main函数中添加

for(;;)
{
if(LoopCount<20)
{
VoltageCLA1[LoopCount]=AdcResult.ADCRESULT1;
LoopCount++;
}
AdcRegs.ADCINTFLGCLR.bit.ADCINT2 = 1;
}

让内核进行存储20个数值,对比CLA的数值,若相同,则说明两者并行。

但是运行结果显示内核中的数组全为0,与CLA中数组全不同。

请问这是为什么?