Skip to content
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

adc to internal temperature #161

Closed
pdgilbert opened this issue Apr 4, 2021 · 4 comments
Closed

adc to internal temperature #161

pdgilbert opened this issue Apr 4, 2021 · 4 comments

Comments

@pdgilbert
Copy link
Contributor

Is it possible to read the internal temperature with adc. I think it is connected to internal channel ADC_IN18 but I don't see how to specify that. (Newbie, so I may just be doing something stupid.)

@hannobraun
Copy link
Contributor

The internal temperature sensor is represented by adc::VTemp. I'm not sure how to use it, but it has an enable method, and presumably can be treated like any other channel after that.

It would be great if we had an example showing this in the repository.

@pdgilbert
Copy link
Contributor Author

Ok, I got it to build. I just used VTemp as the channel and didn't need to do any enable for it to build. I don't have hardware to test that this actually works. I can do a PR with an example if you like, but not testing on hardware is a caveat.

@hannobraun
Copy link
Contributor

Well, I guess having an example that points users in the right direction would be valuable, even if it's not tested. I'd merge your PR, as long as the example has prominent comments that clearly state it needs testing and might possibly not work.

@pdgilbert
Copy link
Contributor Author

I will do a PR shortly. In addition to saying it has not been tested I will suggest if anyone does test it then they could report results here (issue #161). I'll also add a comment about my site https://github.com/pdgilbert/eg_stm_hal/ which has setup() functions for other devices, and several other examples too. Let me know if you would prefer that I omit that.
Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants