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