Other Parts Discussed in Thread: MSP430FR2422
Hi,
I'm porting my application from the MSP430FR2422 to the MSP430FR2522. Everything seems to be working properly except for the ADC.
I'm working with two ADC channels, A0 and A4. They way I switch between channels is by calling a StartADCConversion function which configures the channel and starts the conversion.
Then I get the ADC reading on the ADC interrupt and store it on the structure I passed on the StartADCConversion function.
The issue I'm having is that when I start the conversion with a different channel the ADC gets random readings. Please notice that I wait at least 5 milliseconds between readings.
Code worked fine on the MSP430FR2422 so I'll like to know what is different from the MSP430FR2522.
void StartADCConversion(adc_input_vrbls_t * channel) { //Configure Memory Buffer /* * Base Address for the ADC Module * Input A6 as first multiple sample channel * Use positive reference of AVcc * Use negative reference of AVss */ ADC_configureMemory(ADC_BASE, channel->AdcChannel, ADC_VREFPOS_AVCC, ADC_VREFNEG_AVSS); adcReading = channel; //Enable and Start the conversion //in Multiple-Channels, Single Conversion Mode ADC_startConversion(ADC_BASE, ADC_SINGLECHANNEL); _BIS_SR(GIE); }