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.
Dear all,
I am using TMX320F28377D with CPU1+CLA1. when I try to read ADC results in CLA task, the results I got (using expressions tool of CCS Version: 6.0.1.00040) are not right. In the more details, if I try to read ADCRESULT1, I will get ADCRESULT2. I tried with alternative trigger sources and ADC channels, but this error is repeated. Could you tell me the methods to resolve this problem? Thank you very much!
// I use Cla1Task7 to read ADCD's results
__interrupt void Cla1Task7(){
a++;
b[0]=AdcdResultRegs.ADCRESULT0;
b[1]=AdcdResultRegs.ADCRESULT1;
b[2]=AdcdResultRegs.ADCRESULT2;
b[3]=AdcdResultRegs.ADCRESULT3;
b[4]=AdcdResultRegs.ADCRESULT4;
}
If AdcdResultRegs.ADCRESULT2=1612 (for examples), I will get b[1]=1612 and b[2]=0.
]
Hi Tien,
Please make sure header file "F2837xD_Cla_typedefs.h" is included before any other header file in any of your source files- it redefines the size of int (i.e. 32 on the CLA and 16 on the C28x). The reason you are getting the wrong register access is due to the fact that this type redefinition has not taken place.
Hi Vishal,
Thank you very much for your answer, I will check up my code.
Brgs,
Tien
Hi Vishal,
Your instructions are really useful for me, my code has already fixed.
Thank you very much!
Brgs,
Tien