Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-8496

CC26xx ADC driver configures IO incorrectly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • TI Device Drivers
    • TIDRIVERS-1265
    • 2.21.00
    • 3.40.00
    • Hide
      The ADC driver enables the digital input buffer when configuring the IO pin(s) for the ADC.

      {code}/* Add pin to measure on */
          adcPinTable[i++] = hwAttrs->adcDIO | PIN_INPUT_EN;{code}

      That is not correct and will lead to increased current consumption in the IO, possibly also affecting the ADC measurement.

      The correct configuration of the IO for ADC usage is with both the input- and output buffers disabled and no pull- enabled (the reset setting for the IOC).

      I suggest the driver is changed to explicitly configure the IO back to its reset state, just in case something else has altered its configuration before being used by the ADC driver. Like this:

      {code}//IOC configuration used in TI testing - basically reset configuration for the IOC register.
      #define IOC_ADC (IOC_CURRENT_2MA | IOC_STRENGTH_AUTO | \
                                 IOC_NO_IOPULL | IOC_SLEW_DISABLE | \
                                 IOC_HYST_DISABLE | IOC_NO_EDGE | \
                                 IOC_INT_DISABLE | IOC_IOMODE_NORMAL | \
                                 IOC_NO_WAKE_UP | IOC_INPUT_DISABLE | \
                                 IOC_JTAG_DISABLE){code}
      Show
      The ADC driver enables the digital input buffer when configuring the IO pin(s) for the ADC. {code}/* Add pin to measure on */     adcPinTable[i++] = hwAttrs->adcDIO | PIN_INPUT_EN;{code} That is not correct and will lead to increased current consumption in the IO, possibly also affecting the ADC measurement. The correct configuration of the IO for ADC usage is with both the input- and output buffers disabled and no pull- enabled (the reset setting for the IOC). I suggest the driver is changed to explicitly configure the IO back to its reset state, just in case something else has altered its configuration before being used by the ADC driver. Like this: {code}//IOC configuration used in TI testing - basically reset configuration for the IOC register. #define IOC_ADC (IOC_CURRENT_2MA | IOC_STRENGTH_AUTO | \                            IOC_NO_IOPULL | IOC_SLEW_DISABLE | \                            IOC_HYST_DISABLE | IOC_NO_EDGE | \                            IOC_INT_DISABLE | IOC_IOMODE_NORMAL | \                            IOC_NO_WAKE_UP | IOC_INPUT_DISABLE | \                            IOC_JTAG_DISABLE){code}

      CC26xx ADC driver configures IO incorrectly

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: