-
Notifications
You must be signed in to change notification settings - Fork 1k
Add internal ADC channels (REF, TEMP, BAT) #474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, That allows you to call e.g. Please note that the ADC value must then be converted to Celsius degrees by using the calibration values in ROM locations (depending on the specific MCU). I'm not sure that is the proper way to implement it on the Stm32 Arduino core or whether it can be generalized easily for other variants, but it works for me. This is still a work in progress, but I can post a complete working example sketch if you want. |
Hi @karstengit. You can try also this which doesn't require core modification, only at sketch level:
|
Fix stm32duino#474 Signed-off-by: Frederic.Pillon <[email protected]>
Fix stm32duino#474 Signed-off-by: Frederic.Pillon <[email protected]>
Fix stm32duino#474 Signed-off-by: Frederic.Pillon <[email protected]>
It's perfect that the normal Arduino way of reading an ADC is working.
But it is not working to read the internal temperature sensor.
For example this is not working:
ADCValue = analogRead(ADC_CHANNEL_TEMPSENSOR);
but i found the value ADC_CHANNEL_TEMPSENSOR defined in stm32f1xx_hal_adc.h.
Is there an alternative way?
Thanks in advance.
The text was updated successfully, but these errors were encountered: