cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Vbat and Internal temperature ?

LVolp.2
Associate II

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

1 ACCEPTED SOLUTION

Accepted Solutions
raptorhal2
Lead

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

View solution in original post

5 REPLIES 5
raptorhal2
Lead

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
Associate II

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

raptorhal2
Lead

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
Associate II

Thank you very much for your help :)

WQ
Associate III

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

-WQ