Hi all,
We want to choose the internal voltage reference via API. Through code we have written into the REFSEL of bits of REFCTRL register to select internal reference.
As per datasheet, configure the INTREF value need to set values in the SEL bits of VREF register of SUPC.
19.8.7 Voltage References System (VREF) Control
45.8.6 Reference Control
So we have set the INTREF value as 2.5V by calling following API
hri_supc_write_VREF_SEL_bf(hw ,0x07);
And then We have chosen internal reference by calling the following API,
adc_async_set_reference(&ADC_0 , 0x00);
But we are unable to get 2.5V in ADC channel, instead of 2.5V we are getting 3.3V in channels.
Are we missed anything in configuration?
In datasheet we have found that,
Bit 2 – VREFOE Voltage Reference Output Enable
Value Description
0 The Voltage Reference output (INTREF) is not available as an ADC input channel.
1 The Voltage Reference output (INTREF) is routed to an ADC input channel.
,so we tried to set this bit to set internal voltage reference but we couldn't set / write this bit.
please provide your inputs on these issues.