Part Number:MSP432E401Y
Looking over the code requirements for the ADCBUF. I'm looking at the doxygen API and the description for HWAttrsV1 located here. The relevant code snippet is posted below.
static ADCBufMSP432E4_SequencePriorities sequencePriority[ADCBufMSP432E4_SEQUENCER_COUNT] = {
ADCBufMSP432E4_Priority_0,
ADCBufMSP432E4_Seq_Disable,
ADCBufMSP432E4_Seq_Disable,
ADCBufMSP432E4_Seq_Disable
};
static ADCBufMSP432E4_TriggerSource adcTriggerSource[ADCBufMSP432E4_SEQUENCER_COUNT] = {
ADCBufMSP432E4_TIMER_TRIGGER,
ADCBufMSP432E4_TIMER_TRIGGER,
ADCBufMSP432E4_TIMER_TRIGGER,
ADCBufMSP432E4_TIMER_TRIGGER
};
ADCBufMSP432E4_Channels adcBufMSP432E4Channels[1] = {
{
.adcPin = ADCBufMSP432E4_PE_3_A0,
.adcSequence = ADCBufMSP432E4_Seq_0,
.adcInputMode = ADCBufMSP432E4_SINGLE_ENDED,
.adcDifferentialPin = ADCBufMSP432E4_PIN_NONE,
.adcInternalSource = ADCBufMSP432E4_INTERNAL_SOURCE_MODE_OFF,
.refVoltage = 3300000
}
};
const ADCBufMSP432E4_HWAttrsV1 adcbufMSP432E4HWAttrs[1] = {
{
.intPriority = ~0,
.adcBase = ADC0_BASE,
.channelSetting = adcBufMSP432E4Channels,
.sequencePriority = sequencePriority,
.adcTriggerSource = adcTriggerSource,
.modulePhase = ADCBufMSP432E4_Phase_Delay_0,
.refSource = ADCBufMSP432E4_VREF_INTERNAL,
.useDMA = 1,
.adcTimerSource = TIMER1_BASE,
}
};I'm most interested in better understanding the relationship between the .refSource field in the ADCBufMSP432E4_HWAttrsV1 struct and the .refVoltage field in the ADCBufMSP432E4_Channels struct. If I set the first to ADC_REF_EXT_3V then what purpose does the .refVoltage field serve, and conversly, if I have to set .refVoltage to 2500000 uV (my intended reference voltage on VREF+) than what happens if VREF+ is changed to, say 2.9 V?
Thanks