Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

TMS320F28335: Will TMS320F28335 ADCRESULTn register reserved bits guaranteed to be zero at all times

$
0
0

Part Number:TMS320F28335

Can you please verify the ADCRESULTn reserved bits will always be zero?

Here is my concern...

The ADCisr does the following:

uint16_t ADC_Reading1 = ADC_getValue(ADC_MOD_1);  // Read all 16 bits of register

Some parts of the code mask of the upper 12 bits of the ADC as follows:

uint16_t adcLevel1 = ADC_Reading1 & 0x0FFF; // This is safe by masking off reserved bits

While other parts of the code use ADC_Reading1 directly as follows:

if (ADC_Reading1 < 1) {

   // BUG??? This code won't get called if a reserved bit is set

}


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>