ADuCM3029 ADC_CFG bit 3 purpose?

Hi,

In adi_adc.c, the adi_adc_SetVrefSource() function is setting bit no. 3 (mask 0x8) of the ADC_CFG register when eVrefSrc is ADI_ADC_VREF_SRC_VBAT. But I can't seem to find any information on this bit in the Hardware Reference Manual.

What is the purpose of this bit?

 

/* macro definition for ADuCM3029 */
#if defined(__ADUCM302x__)
#define BITM_ADC_CFG_VREFVBAT                (_ADI_MSK_3(0x00000008,0x00000008U, uint16_t  ))    /*  VRef VBAT */
#endif

/* ... */

ADI_ADC_RESULT adi_adc_SetVrefSource (
    ADI_ADC_HANDLE   hDevice,
    ADI_ADC_VREF_SRC eVrefSrc)
{
    /* ... */
        case ADI_ADC_VREF_SRC_VBAT:
        pDevice->pReg->CFG |= BITM_ADC_CFG_VREFVBAT;
        break;
    /* ... */
}

Thanks,
Guillaume

Parents
  • 0
    •  Analog Employees 
    on Jan 18, 2018 12:13 AM

    Hi ,

    Bit no. 3 of ADC_CFG register is reserved in case of ADuCM3027/ADuCM3029. The behavior of ADuCM302x is not guaranteed or supported if writing to reserved peripheral configuration registers.

    If you do need to use VBAT_ADC as ADC reference in case of ADuCM302x, you could consider connecting VBAT_ADC to VREFP_ADC pin externally and configure the ADC to use external reference. 

    Best Regards,

    Narsimh 

Reply
  • 0
    •  Analog Employees 
    on Jan 18, 2018 12:13 AM

    Hi ,

    Bit no. 3 of ADC_CFG register is reserved in case of ADuCM3027/ADuCM3029. The behavior of ADuCM302x is not guaranteed or supported if writing to reserved peripheral configuration registers.

    If you do need to use VBAT_ADC as ADC reference in case of ADuCM302x, you could consider connecting VBAT_ADC to VREFP_ADC pin externally and configure the ADC to use external reference. 

    Best Regards,

    Narsimh 

Children
No Data