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.

CC2640: ADC not working

Part Number: CC2640


Hello,

I'm trying to get the ADC working on the CC2640, following the steps described here:


However, I cannot get it to work, as the ADC FIFO remains empty. This is my setup code:


        AUXWUCClockEnable(AUX_WUC_SOC_CLOCK | AUX_WUC_ADC_CLOCK);

        AUXADCSelectInput(ADC_COMPB_IN_AUXIO7);

        AUXADCEnableSync(AUXADC_REF_FIXED, AUXADC_SAMPLE_TIME_2P7_US, AUXADC_TRIGGER_MANUAL);

        Power_setConstraint(Power_SB_DISALLOW);

        AUXADCGenManualTrigger();

I then periodically execute this:

uint32_t fifo_status = AUXADCGetFifoStatus();

AUXADCGenManualTrigger();

But fifo_status is always 1, that is, AUXADC_FIFO_EMPTY_M. Why is this happening? IOID_23 (AUXIO7) is configured as follows: PIN_INPUT_DIS      | PIN_GPIO_OUTPUT_DIS.

Thanks!