mirror of https://github.com/ARMmbed/mbed-os.git
Extend nRF51 AnalogIn voltage range to 3.6 V
Previous the voltage range was set to 1.2 from SoC internal reference source. This caused problem with testing. It is unexpected that range is much shorter than vdd as well. The voltage range was extended using SoC build in analog prescaler (set to 1/3).pull/5200/head
parent
c6f655c02e
commit
f861b37196
|
@ -67,7 +67,7 @@ uint16_t analogin_read_u16(analogin_t *obj)
|
|||
|
||||
// initialization by assigment because IAR dosen't support variable initializer in declaration statement.
|
||||
adc_channel.config.config.resolution = NRF_ADC_CONFIG_RES_10BIT;
|
||||
adc_channel.config.config.input = NRF_ADC_CONFIG_SCALING_INPUT_FULL_SCALE;
|
||||
adc_channel.config.config.input = NRF_ADC_CONFIG_SCALING_INPUT_ONE_THIRD;
|
||||
adc_channel.config.config.reference = NRF_ADC_CONFIG_REF_VBG;
|
||||
adc_channel.config.config.ain = (obj->adc_pin);
|
||||
adc_channel.p_next = NULL;
|
||||
|
|
Loading…
Reference in New Issue