This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TM4C123GH6PM: TM4C123GH6PM

Part Number: TM4C123GH6PM

Tool/software: TI C/C++ Compiler

Hello,

I am using this part to sample 5 ADC channels through Sample sequence 0 with each PWM trigger.

I want to use Digital Comparators alongwith ADC so that, if sampled values are beyond limit, I can shut down PWM engine. I have configured ADC and Digital comparator using TivaWare Library and ADC is working fine as expected.

However, I am not getting comparator interrupt anytime. To test it, I have minimized digital comparator (0-3) values so as to get comparator interrupt. Below is comparator initilization. Please let me know whether I missed anything.

void
ADCComparatorsInit(void)
{
//
// Configure the Digital Comparator registers
//
ADCComparatorConfigure( ADC0_BASE, 0, ADC_COMP_INT_HIGH_ONCE );
ADCComparatorConfigure( ADC0_BASE, 1, ADC_COMP_INT_HIGH_ONCE );
ADCComparatorConfigure( ADC0_BASE, 2, ADC_COMP_INT_HIGH_ONCE );

ADCComparatorRegionSet( ADC0_BASE, 0, 50, 55 );
ADCComparatorRegionSet( ADC0_BASE, 1, 50, 55 );
ADCComparatorRegionSet( ADC0_BASE, 2, 50, 55 );
//Clear Comparator interrupt if any
ADCComparatorIntClear(ADC0_BASE, ADCComparatorIntStatus( ADC0_BASE ));
ADCComparatorIntEnable( ADC0_BASE, 0);
}

While going through datasheet, I see one register ADCSSOP0 (ADC Sample Sequence 0 Operation). Does this mean that, I can use ADC for either storing samples in FIFO or for digital comparator (and not for both)?

If yes, can I use ADC1 module for Compaator and ADC0 for FIFO for all five analog channels with Sample sequence 0?

Thank you in advance

Narendra