Skip to main content
brazov22
Associate III
October 13, 2019
Question

What does happen in STM32F4 if I configure an I/O as analog, but it is not an analog one? I mean, smith trigger and output buffer are disabled as well as pu and pd?

  • October 13, 2019
  • 4 replies
  • 2049 views

..

This topic has been closed for replies.

4 replies

Tesla DeLorean
Guru
October 13, 2019

>>but it is not an analog one?

What does that mean?

The pin will just float in a Hi-Z state, it will track whatever external circuit you have attached to it, just don't exceed the min/max voltages specified in the data sheet.

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
brazov22
brazov22Author
Associate III
October 13, 2019

it means that analog switch is not present on that IO

waclawek.jan
Super User
October 13, 2019

I wouldn't bet on it - undefined combinations might have been optimized by the silicon compiler to a surprising result. For example, on 'F4, I've by mistake used an undefined AF for a particular pin, and it - for me quite surprisingly - turned the pin to output.

So, the short answer is "don't do it", and if you have the buying power as expressed in $M++, you can ask ST directly.

JW

waclawek.jan
Super User
October 13, 2019

Quick experiment on PC11 on 'F429 DISCO revealed that changing it to Analog indeed switched off pullup and IDR did not reflect the input level anymore (whether that means that ths Schmitt trigger was switched on and/or whether this means decreased leakage, I am not going to judge).

As much as experiments are worth...

JW

brazov22
brazov22Author
Associate III
October 16, 2019

the purpose is to configure it as analog pin before entering in stop2 in order to reduce consumption.