Tool/software:
Hi,
I configured the ADC analog inputs as follow:
ROM_GPIOPinTypeADC(GPIO_PORTK_BASE, GPIO_PIN_0); // AIN16
ROM_GPIOPinTypeADC(GPIO_PORTK_BASE, GPIO_PIN_1); // AIN17
ROM_GPIOPinTypeADC(GPIO_PORTK_BASE, GPIO_PIN_2); // AIN18
ROM_GPIOPinTypeADC(GPIO_PORTK_BASE, GPIO_PIN_3); // AIN19
and then try to read the value from it:
ADCSequenceConfigure(ADC0_BASE, 3, ADC_TRIGGER_PROCESSOR, 0);
ADCSequenceStepConfigure(ADC0_BASE, 3, 0, ADC_CTL_CH16 | ADC_CTL_IE |
ADC_CTL_END); // and so on for ADC_CTL_CH17/18/19
//
// Since sample sequence 3 is now configured, it must be enabled.
//
ADCSequenceEnable(ADC0_BASE, 3);
//
// Clear the interrupt status flag. This is done to make sure the
// interrupt flag is cleared before we sample.
//
ADCIntClear(ADC0_BASE, 3);
//
// Sample the temperature sensor forever. Display the value on the
// console.
//
while(1)
{
//
// Trigger the ADC conversion.
//
ADCProcessorTrigger(ADC0_BASE, 3);
//
// Wait for conversion to be completed.
//
while(!ADCIntStatus(ADC0_BASE, 3, false))
{
}
//
// Clear the ADC interrupt flag.
//
ADCIntClear(ADC0_BASE, 3);
//
// Read ADC Value.
//
ADCSequenceDataGet(ADC0_BASE, 3, ADCValues);
The other AIN0-15 are working just fine, and I can read their values.
the HW-engineer that works with me was able to touch the Pins (18-21 accordingly) and to see the wanted value.
Any help will be appreciated,
Tzipi