Skip to content

Commit f861b37

Browse files
committed
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).
1 parent c6f655c commit f861b37

File tree

1 file changed

+1
-1
lines changed
  • targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED

1 file changed

+1
-1
lines changed

targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/analogin_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ uint16_t analogin_read_u16(analogin_t *obj)
6767

6868
// initialization by assigment because IAR dosen't support variable initializer in declaration statement.
6969
adc_channel.config.config.resolution = NRF_ADC_CONFIG_RES_10BIT;
70-
adc_channel.config.config.input = NRF_ADC_CONFIG_SCALING_INPUT_FULL_SCALE;
70+
adc_channel.config.config.input = NRF_ADC_CONFIG_SCALING_INPUT_ONE_THIRD;
7171
adc_channel.config.config.reference = NRF_ADC_CONFIG_REF_VBG;
7272
adc_channel.config.config.ain = (obj->adc_pin);
7373
adc_channel.p_next = NULL;

0 commit comments

Comments
 (0)