After reading the app note AT03243 SAM Analog to Digital Converter Driver.
I am trying to run the ADC quick start example on the SAMD21Xplained board and it seems to hang in the adc_read function call.
//get results //
/* Wait for conversion to be done and read out result */
} while (adc_read(&adc_instance, &result) == STATUS_BUSY);
I don't have anything connected to my analog inputs. I was planning to run this in debug mode and observe the "result" variable which should give some reading, however small the reading may be.
I've added "result" to the watch list here is what it shows:
pausing the debugger takes me to this statement in adc.h
/* Clear interrupt flag */
adc_module->INTFLAG.reg = int_flags;
Do I really need something connected to the ADC for this to work? What am I missing?
thanks in advance.