Skip to main content
LVolp.2
Associate II
Aug 17, 2022 11:53 AM UTC
Solved

How to get Vbat and Internal temperature ?

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.
raptorhal2
raptorhal2Best answer
Lead
Aug 17, 2022 1:36 PM UTC

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
Aug 17, 2022 1:36 PM UTC

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
Aug 17, 2022 1:40 PM UTC

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
Aug 26, 2022 6:28 PM UTC

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

-WQ

raptorhal2
Lead
Aug 17, 2022 1:59 PM UTC

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
Aug 22, 2022 8:47 AM UTC

Thank you very much for your help :)