6 days, 14 hours ago.
How can I get the implementations of ADC_VREF and ADC_TEMP?
How can I get the implementations of ADC_VREF and ADC_TEMP imported into the nRF51 library? These defines were used in the answer posted by os.mbed.com/users/rajhanssingh/ for the stm32l152re in os.mbed.com/questions/75910/How-to-get-the-value-of-inbuilt-vref-int/
Error: Identifier "ADC_VREF" is undefined in "shields/main.cpp", Line: 29, Col: 19 Error: Identifier "ADC_TEMP" is undefined in "shields/main.cpp", Line: 30, Col: 19
5 days, 21 hours ago.
we cannot read ADC_VREF value directly on nRF51822.
So the following program measures VDD then you can compensate Vref value if you want to do it.
Send VDD voltage data and chip temperature data via BLE UART Service. You can see the data on iPhone nRF Toolbox UART application.
Please see nRF51_Vdd.cpp line35 to line49.
Input voltage sets internal Vdd/3 (CPU power line voltage).
Reference voltage sets VBG/1 (internal reference voltage (Voltage Band Gap reference) = 1.2V +/-1.2%).
Get 10bit ADC result as value name "wrk".
Then VDD = (wrk/ 1024) * 1.2 * 3.0.
If your VDD measurement value (by DVM) and above VDD are different, you can compensate 1.2V(VBG).
Temperature measurement, you can use SoftDevice function.
Please see main.cpp line120,121.
6 days, 11 hours ago.
Are you asking about internal ADC inside the nRF51? If you look in the mbed-os libary, I believe most STM boards have ADC_VREF and ADC_TEMP as pin names to the internal ADCs. I don't believe the nRF51 has internal ADC channels therefore they produce an undefined error. Let us know if you have any more questions!
-Karen, team Mbed
If this solved your question, please make sure to click the "Thanks" link below!
To post an answer, please log in.