I am using the F28377D processor with CCSv6 6.0.1.00040, and I am trying to use the CLA to read my ADC values, and I need to perform some floating point math on the ADC results -- within the CLA.
I can read the AdcxResultRegs.ADCRESULTx registers to a data-type of unsigned int and return them to CPU1 as unsigned ints. However if I read the AdcxResultRegs.ADCRESULTx registers to a float variable OR read the AdcxResultRegs.ADCRESULTx registers to a U16 and convert to a float, the resulting float is not the same integer value.
For example, reading the results from the CLA within the CPU debugger:
CLA code:
RawNeg5VMonCount2 = AdccResultRegs.ADCRESULT6; //RawNeg5VMonCount2 is a U16
ADCResults.D5VMon = RawNeg5VMonCount2; //ADCResults.D5VMon is a float
In CPU1:
RawNeg5VMonCount2 = 2279d
ADCResults.D5VMon = 1.507349E+08
I have tried various combinations of this, with and without casting. Also if I hard-code ADCResults.D5VMon = 2279 (in the CLA), it is returned correctly to CPU1, so I know the interface is OK.
Is this possible to do within the CLA? Do you have any suggestions?
Thanks,
Jim