Skip to main content
LVolp.2
Associate II
August 17, 2022
Solved

How to get Vbat and Internal temperature ?

  • August 17, 2022
  • 5 replies
  • 3273 views

Hello,

I am using a p-Nucleo-wb55.

I would need to get data from vbat channel and the internal temperature channel.

I used the example for internal temperature and it works but I am not able to add the reading of vbat value.

Am I supposed to use one rank per channel?

How do I add a rank using the .ioc file ?

0693W00000QNtNoQAL.png 

Thank you

This topic has been closed for replies.
Best answer by raptorhal2

Am I supposed to use one rank per channel? Yes

How do I add a rank using the .ioc file ? Add it to the initialization source code

Also - use a much larger sample time for temperature. Internal voltage signal sources have a high impedance.

Cheers, Hal

5 replies

raptorhal2
raptorhal2Best answer
Lead
August 17, 2022

Am I supposed to use one rank per channel? Yes

How do I add a rank using the .ioc file ? Add it to the initialization source code

Also - use a much larger sample time for temperature. Internal voltage signal sources have a high impedance.

Cheers, Hal

LVolp.2
LVolp.2Author
Associate II
August 17, 2022

Hello,

Thank you for your answer.

Just to be sure, I add the configuration of the rank 2 (for example) that enable my channel VBAT as shown in this picture ?

0693W00000QNtqRQAT.png

WQ_it
Associate III
August 26, 2022

You need to adjust the SamplingTime for Temperature and VBAT channels. They are quite long.

-WQ

raptorhal2
Lead
August 17, 2022

Yes, but if the initialization is sequenced like this, you don't have to repeat intialization of structure members that don't change from the last rank.

For internal channels, see the example internal channel projects available for recommended sample times. They are typically much higher than what you are using.

Find a DMA ADC example to follow for two or more ranks.

Cheers, Hal

LVolp.2
LVolp.2Author
Associate II
August 22, 2022

Thank you very much for your help :)