Max input voltage on Y pins?

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
Xylon
Posts: 1
Joined: Tue Feb 14, 2017 11:35 am

Max input voltage on Y pins?

Post by Xylon » Tue Feb 14, 2017 11:37 am

What's the max input voltage I can put on the Y pins?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Max input voltage on Y pins?

Post by Roberthh » Tue Feb 14, 2017 3:02 pm

In general, the STM32F405 GPIO Pins, which is used on Pyboard, are 5V tolerant, UNLESS they are in analog mode and used as ADC input. When used as ADC, the maximum input voltage is 3.3 V. So it depends on how you use them

chrismas9
Posts: 152
Joined: Wed Jun 25, 2014 10:07 am

Re: Max input voltage on Y pins?

Post by chrismas9 » Wed Feb 15, 2017 10:02 am

Some STM32 pins are never 5V tolerant, even when configured as GPIO. They vary between MCU's, eg:

STM32F405. PA4, PA5
STM32F411. PA0 PA4, PA5, PB5
STM32L476 PA3, PA4, PA5, PB0

It's best to check the ST data sheet as the 3V pins vary from chip to chip. In the data sheets the 5V tolerant pins are labelled FT in the pin table. The non 5V tolerant pins are marked either TC or TT.

As well as those pins all analog pins (ADC, DAC,OPAMP, COMPARATOR), eg PA1 are not 5V tolerant when their analog function is selected.

For PYB PA4 (X5), PA5 (X6) are 3V pins. All of Y port is 5V.
For PYBLITE PA0 (X1), PA4 (X4), PA5 (X6) are 3V pins

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Max input voltage on Y pins?

Post by Roberthh » Wed Feb 15, 2017 5:08 pm

When I look into the STM32F405 data sheet, all GPIO's are marked with FT, but a handful of them have a note (4), which tells:
4. FT = 5 V tolerant except when in analog mode or oscillator mode (for PC14, PC15, PH0 and PH1).

chrismas9
Posts: 152
Joined: Wed Jun 25, 2014 10:07 am

Re: Max input voltage on Y pins?

Post by chrismas9 » Wed Feb 15, 2017 9:40 pm

The latest data sheet is rev 8.

http://www.st.com/content/st_com/en/pro ... 405rg.html

PA4 and PA5 are TTa. The history says this was changed in rev 2 in 2012.

It appears that analog outputs (DAC, OPAMP) are 3V, but that doesn't explain the F411 which has no DAC or OPAMPS. PB5 is a digital pin but 3V. PA0, PA4, PA5 are analog inputs.

Another thing to watch is the default pin state during and after reset. The F405 has floating inputs which are 5V tolerant (for FT pins). L433 has all pins set as analog inputs but the FT pins don't have a 3V limit in analog mode.

FT pins are not 5V tolerant when pullup or pulldown are enabled. Be careful of JTAG and SPI pins. On some parts the JTAG pins wake up with pullups or pulldowns. On some parts the bootloader enables pullups and pulldowns on the SPI pins. In this case you can't drive these pins with 5V at reset, or until you reconfigure them software.

Bottom line every MCU is different. You need to read the data sheet and AN2606 (bootloader) before using 5V on pins.

chrismas9
Posts: 152
Joined: Wed Jun 25, 2014 10:07 am

Re: Max input voltage on Y pins?

Post by chrismas9 » Thu Feb 16, 2017 9:26 pm

I have done some more research on 5V compatibility.

According to AN4488 and newer data sheets all STM32 MCU's have internal pullup or pulldown resistors on the JTAG pins PA13, PA14, PA15 and PB4. These pins are not 5V tolerant until changed to GPIO or AF by software. On PYB and PYBLITE these pins drive the 4 LEDs and are not a problem, but may e exposed on other boards.

STM32F405 on PYB does not have SPI bootloader so all other FT pins are always 5V tolerant.

STM32F411 on PYBLITE has three SPI boot ports. The following pins are not 5V tolerant in BOOT mode when using DFU reprogramming:

PA4, PA5, PA6, PA7, PA15, PB12, PB13, PB14, PB15, PC10, PC11, PC12. This means PYBLITE X and Y ports are not all 5V tolerant during DFU Bootloading.

Post Reply