1
\$\begingroup\$

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!

\$\endgroup\$
  • 1
    \$\begingroup\$ Of course. Start by locating the manufacturer's distribution of example code for the board and/or specific MCU sub-family, and building and trying some of it. Beyond that simple "yes", you don't really have a specifically answerable question within the mission of this site - how to do it is both "too broad" and too much a search for external resources. \$\endgroup\$ – Chris Stratton Apr 30 at 18:11
  • \$\begingroup\$ Hi there, way back when I started with a development board like this and it's really overwhelming at first. Question: have you every played with an Arduino? I started learning on a Pic 16 development board and it had some integrated LEDs. I would work towards blinking one of the integrated LEDs, and learn how to program your board to blink an LED on and off every 2 seconds. (Believe it or not, if you can get to that point you're like 65% of the way to building a full system! You'll learn how to time interrupts and toggle the GPIOs to do things. Next get a sensor and read an input). \$\endgroup\$ – Leroy105 Apr 30 at 19:10
  • \$\begingroup\$ just use the I/O pins not used by on board stuff. but as mentioned start by blinking the leds that are there and the buttons. then maybe more on board stuff or add off board stuff. dont use interrupts to start, dont use interrupts until you have to, lots to learn before then. \$\endgroup\$ – old_timer Apr 30 at 20:10
4
\$\begingroup\$

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.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.