STM32 internal temperture sensor library?

Can someone help me port this library?
Post Reply
ChrisMicro
Posts: 299
Joined: Fri Mar 24, 2017 4:51 pm
Location: Germany

STM32 internal temperture sensor library?

Post by ChrisMicro » Mon Jun 12, 2017 5:27 pm

Is there a library to read the STM32 MCUs internal temperature sensor?

User avatar
ddrown
Posts: 136
Joined: Sat Jan 09, 2016 4:49 am

Re: STM32 internal temperture sensor library?

Post by ddrown » Thu Jun 15, 2017 9:43 pm

There's an example under A_STM32_Examples > General > InternalTempSensor, have you tried that?

ChrisMicro
Posts: 299
Joined: Fri Mar 24, 2017 4:51 pm
Location: Germany

Re: STM32 internal temperture sensor library?

Post by ChrisMicro » Fri Jun 16, 2017 4:33 am

There's an example under A_STM32_Examples > General > InternalTempSensor, have you tried that?
Thanks for the hint.
You mean this one?
I didn't know that there is this large example directory and use mainly the STM32GENERIC framework because it supports a lot of boards I have.

zmemw16
Posts: 1422
Joined: Wed Jul 08, 2015 2:09 pm
Location: St Annes, Lancs,UK

Re: STM32 internal temperture sensor library?

Post by zmemw16 » Fri Jun 16, 2017 4:39 am

the contents of the examples menu are tied to the board in use.
if you selected say stm32generic and black f407ve, you won't see the example menu for the f1 from arduino_stm32.
it's tied to which of arduino_stm32 or stm32generic you've selected the board under.
stephen

User avatar
RogerClark
Posts: 6917
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia
Contact:

Re: STM32 internal temperture sensor library?

Post by RogerClark » Fri Jun 16, 2017 5:28 am

Just to confirm and clarify what stephen posted

LibMaple has its own method to access the registers of the hardware, which does not use the HAL (because when LibMaple was written (by LeadLabs) in 2012, the HAL did not exist) - (Yes STM had the Standard Peripheral Library but its license prohibited redistribution hence made it impractical to use as a base for LibMmaple)

However if you look at the LibMaple code, it should be simple to port to a HAL version, as it looks like the only non-Arduino API calls are to setup the input to the ADC

Post Reply