HI,EVERYONE,
in the document 'nRF51422_PS_v3.0.pdf' ,Page 167, there is such statement
'The selected analog pin will be acquired by the ADC when it is enabled through the ENABLE register, see GPIO chapter for more information on how analog pins are selected.'
Then in the Page 56, 14 General-Purpose Input/Output (GPIO),there is such statement
'• Analog input (for selected pins)'
but in the description of the register, there is no bit to config for the AIN pin.
So i do not know which can be configured for the ADC .
Following function is drived from nRF5_SDK_11.0.0-2.alpha_bc3f6a0\examples\peripheral\adc_simple
void adc_config(void)
{
const nrf_adc_config_t nrf_adc_config = NRF_ADC_CONFIG_DEFAULT;
// Initialize and configure ADC
nrf_adc_configure( (nrf_adc_config_t *)&nrf_adc_config);
nrf_adc_input_select(NRF_ADC_CONFIG_INPUT_2);
nrf_adc_int_enable(ADC_INTENSET_END_Enabled << ADC_INTENSET_END_Pos);
NVIC_SetPriority(ADC_IRQn, NRF_APP_PRIORITY_HIGH);
NVIC_EnableIRQ(ADC_IRQn);
}
Thank you.