Part Number:MSP432E401Y
I would like some help on setting up the MSP432E401Y to sample 12 analog inputs (Channels 0-11) in sequence and generate
an interrupt when the last channel (channel 11) sample is done.
The maximum sequencer size is 8. I would like to know how to utilize these sequencers if i wanted to
Currently i can implement this with 8 channels (Channels 0-5, 7 and cpu temperature sensor) using sample sequencer 0 of ADC0 my setup code is as follows
(excluding the MAP_SysCtlPeripheralEnable(..) and MAP_GPIOPinTypeADC(..) portions)
*********************************************
ADCReferenceSet(ADC0_BASE, ADC_REF_INT); // Use internal 3 V as reference
// Configure HW Averaging of 32x
MAP_ADCHardwareOversampleConfigure(ADC0_BASE, 32);
// Configure ADC0 Sequencer 0 (SS0) to sample the analog channels AIN0-AIN7.
//
MAP_ADCSequenceStepConfigure(ADC0_BASE, 0, 0, ADC_CTL_CH0);
MAP_ADCSequenceStepConfigure(ADC0_BASE, 0, 1, ADC_CTL_CH1);
MAP_ADCSequenceStepConfigure(ADC0_BASE, 0, 2, ADC_CTL_CH2);
MAP_ADCSequenceStepConfigure(ADC0_BASE, 0, 3, ADC_CTL_CH3);
MAP_ADCSequenceStepConfigure(ADC0_BASE, 0, 4, ADC_CTL_CH4);
MAP_ADCSequenceStepConfigure(ADC0_BASE, 0, 5, ADC_CTL_CH5);
MAP_ADCSequenceStepConfigure(ADC0_BASE, 0, 6, ADC_CTL_TS ); // Internal Temperature sensor
// Configure interrupt to be set when this sample is done and tell ADC this is the
// last conversion on the sequencer
MAP_ADCSequenceStepConfigure(ADC0_BASE, 0, 7, ADC_CTL_CH7 | ADC_CTL_IE |ADC_CTL_END);
MAP_ADCSequenceConfigure(ADC0_BASE, 0, ADC_TRIGGER_ALWAYS, 0);
MAP_ADCSequenceEnable(ADC0_BASE, 0);
MAP_ADCIntEnable(ADC0_BASE, 0);
MAP_IntEnable(INT_ADC0SS0); // Interrupt generation from ADC-0 sequencer 0
******************************************************************
Thanks
David