cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G4 pin shortage issue

VDhev.1
Associate II

Hi,

We are planing to use stm32g4 higher end micro controller 128 pins(107 GPIO). We had faced issue for pin shortage.

We want to know JTAG, Oscillator we can use as multi functionality (Ex - Debug as well as GPIO or etc...) functionality ?

Pins:

PA15 - SYS_JTDI

PA14 - SYS_JTCK-SWCLK

PA13 - SYS_JTMS-SWDIO

PB3 - SYS_JTDO-SWO

G10 - NRST

PF0 - OSC_IN

PF1 - OCC_OUT

PG10 - NRST

PC14 - OSC32_IN

PC15 - OSC32_OUT

PB8 - BOOT0

We not going to use RTC can we use OSC32_IN, OSC32_OUT as GPIO or other peripheral ?

TI has any faster GPIO extender(more pins) recommenced ic's ?

Thanks & Regards,

Vasu

3 REPLIES 3
Nikita91
Lead II

If you use ST_LINK for debug (and not JTAG) you can use PA15 as GPIO/alternate

If you don't need SWO (High speed debug trace output) you can use PB3 as GPIO / alternate

You can use RST as GPIO with great care...

If you don't use HSE quartz as system clock source you can usePF0/PF1 as GPIO

If you use HSE bypass as system clock source you can use PF1 as GPIO.

PC14/PC15 can be used as GPIO

PB8 can be used as GPIO. You still provide the right level at boot time or set the internal flash options to ignore the BOOT0 pin (e.g. BOOT_LOCK or nBOOT0 flags). Have a look to RM0440 chapter "Boot configuration" P90.

All is explained in the reference manual RM0440 (Chapter "Boot configuration" P90 for BOOT0 configuration)

TDK
Guru

Note that PC13-PC15 have limited driving capability.

0693W00000HpNgKQAV.png

If you feel a post has answered your question, please click "Accept as Solution".
Nikita91
Lead II

I2C IO extenders are very slow...

I use:

For output the well known SN74HC595 for output: 3 command pins, cascadable, > 10MHz clock. Or the faster new SN74HCS595.

For input: SN74HCS165: 3 pins, cascadable, > 40 MHz clock