Hello ,I work with the sdk 12, I have a program to contoler the level of battery, it works, except that I recode 3870 mV (with USB) and when I measure the pin VDD I find 2.88. I do not know is what I made a code fault thanks
Hello ,I work with the sdk 12, I have a program to contoler the level of battery, it works, except that I recode 3870 mV (with USB) and when I measure the pin VDD I find 2.88. I do not know is what I made a code fault thanks
Can you read out the value in the CONFIG register?
Thanks you, Carsten , i can now read out the Value in CONFIG register is 20000 , but i don't know exactly where the problem
Ok, then we've confirmed that the config is setup with gain = 1/6, and it should have an input range of 3.6V. Could you try another input, one of the AIN0 - AIN8? Maybe one that is connected to ground? For example NRF_SAADC->CH[0].PSELP = 0x1 or something similar. I want to see that the output value changes.
Thanks you , I get always the same value 3870 mV and 20000 for NRF_SAADC->CH[0].CONFIG , although I change NRF_SAADC->CH[0].PSELP .I feel like it does not detect good value, because it is fixed in 1024 (3870mV)
Yes, it seems like the SAADC is not sampling. I would recommend that you look at the adc_buf directly, and ensure that you actually see the value changing. Try sampling some analog input, like ground, it should change for each sampled value.