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.

TMS320F280041: ADCRESULTx always reads 0

Part Number: TMS320F280041
Other Parts Discussed in Thread: C2000WARE

I use the following configuration for the three ADCs on the F280041:

    /*
     * Enable internal reference on ADCs
     */
    ADC_setVREF(ADCA_BASE, ADC_REFERENCE_INTERNAL, ADC_REFERENCE_3_3V);
    ADC_setVREF(ADCB_BASE, ADC_REFERENCE_INTERNAL, ADC_REFERENCE_3_3V);
    ADC_setVREF(ADCC_BASE, ADC_REFERENCE_INTERNAL, ADC_REFERENCE_3_3V);

    /*
     * Set ADCCLK divider to /2
     */
    ADC_setPrescaler(ADCA_BASE, ADC_CLK_DIV_2_0);
    ADC_setPrescaler(ADCB_BASE, ADC_CLK_DIV_2_0);
    ADC_setPrescaler(ADCC_BASE, ADC_CLK_DIV_2_0);


    /*
     * Set pulse positions to late
     */
    ADC_setInterruptPulseMode(ADCA_BASE, ADC_PULSE_END_OF_CONV);
    ADC_setInterruptPulseMode(ADCB_BASE, ADC_PULSE_END_OF_CONV);
    ADC_setInterruptPulseMode(ADCC_BASE, ADC_PULSE_END_OF_CONV);

    /*
     * Power up the ADC and then delay for 1 ms
     */
    ADC_enableConverter(ADCA_BASE);
    ADC_enableConverter(ADCB_BASE);
    ADC_enableConverter(ADCC_BASE);

    DEVICE_DELAY_US(1000);

The peripherals clocks are of course enabled:

    SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ADCA);
    SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ADCB);
    SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_ADCC);

When I configure a channel to be sampled by ADCA, everything works fine, the AdcaResultsRegs.ADCRESULTx contain valid values.

However, ADC B shows a strange behaviour: For instance, if I configure channel B0 to be sampled by ADCB with SOC nr. 6, the following happens:

  • The ADC gets configured properly,
  • The ADC actually converts something:
  • BUT: the results register always reads zero!!

The same problem occurs with other channels on ADC B as well as ADC C. Only ADC A seems to work properly.

Did I miss some configuration? What could cause such an issue?

Many thanks in advance for your help.

Cheers, Emil