cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F334R8 Internal Temperature and USART

Georg Busch
Associate
Posted on January 02, 2018 at 22:59

Hi there,

Setup:

STM32F334R8 on a NUCLEO-F334R8 on a custom PCB with power supply, CAN tranceiver, I2C slaves and RS232 Tranceiver.

uVision5 Toolchain and STM32CubeMX

Problem: I want to read out the internal temperature of the MCU, but the reading of ADC1->DR is always 0x0FFF

Stuff I tried: Every piece of code from the internet ..., the project that comes with the Cube FW F3, reading out Vref and Vbat. But the value always stays the same.

Now the weird part: When I remove the Nucleo board from my PCB (more specifically PA3 - configured as USART_RX), select U5V on JB5 (power from USB not external), the value suddenly drops and keeps changing within the LSB. After converting the value to celsius, the temperature is legit. I started a new project with nothing but ADC1 (no USART), the behavior is still the same.

Question: Is it normal that internal measurements and USART on PA3 on a NUCLEO-F334R8 won't work together? According to the schematics nothing should interfere with Vref or Avdd (looking at you, SB61).

Any Tips?

#usart-rx #internal-temperature-sensor #nucleo-f334r8
3 REPLIES 3
Posted on January 10, 2018 at 18:42

What voltage are you driving the USART RX pin at?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
T J
Lead
Posted on January 10, 2018 at 21:42

I had to use the ADC - DMA  solution to make my boards stable.

I am getting all the A/D values 18 I think..

Posted on January 10, 2018 at 21:35

Thanks for your reply!

I am using the MAX3232 with a 5.0V supply.