Electronic – Using the GPIOs of an STM32 Discovery board

gpiomicrocontrollerstm32stm32f4-discoverystm32l

I would like to start learning how to program an STM32, because of this I bought the STM32L152C Discovery board.

stm32l152c-discovery

It's a very nice board, full of goodies, but I would like to use just part of them: for instance I don't want to use the LCD which uses a lot of GPIOs, but I want to use the integrated 32.768 kHz quartz to perform RTC funcionalities.

Is it possible to use the GPIOs without interfering with the internal goodies? I mean, if I use a GPIO pin which is also used by the LCD, can it be a problem?(for example draining to much current)

Greetings!

Best Answer

Is it possible to use the GPIOs without interfering with the internal goodies? I mean, if I use a GPIO pin which is also used by the LCD, can it be a problem?

Yes. Unplug the LCD glass from the board -- it's mounted in a DIP-style socket. Once you've done this, the pins are available for use.

There are a few other peripherals on this board which cannot easily be disconnected from the target MCU. (In particular, the user LEDs LD3 and LD4 cannot be disconnected without some desoldering.) You should have plenty of GPIOs to work with already, though.

The pin planner tool in STM32CubeMX is incredibly helpful in selecting pins for your application. I would highly recommend that you use it.