Skip to main content
Associate
October 5, 2026
Question

Beginner, trying to select STM32 for school related project

Greetings

I am apprentice in electronics and for a school project I am trying to build a digital clock based on an STM32. I want to use an ST7735 based SPI display to show the time, because I am already familiar with the Adafruit GFX library (I did something similar on Arduino before). Since I have never done a project before, where I am selecting my MCU, although I already have some experience regarding PCB design. My questions/criteria are as follows:

  • I want to have a MCU that I can solder by hand, therefore BGA packages and the like are out of the question
  • The MCU needs to be compatible with the mentioned graphics library, I am aware of HAL libraries but would need assistance in choosing one
  • I need at least 7 or 8 GPIOs to be available, so I can use external buttons to change the time
  • I assume SPI and I2C (might 
  • I want to be able to do the programming directly with the MCU soldered to the board, should I implement the programming interface via USB or should I use the SW pins?

If I were to get a recommendation for an MCU, I would also appreciate some help with choosing a dev board, so I can work on the code without having the board ready yet.

Thank you in advance

 

24 replies

Gyessine
ST Technical Moderator
October 6, 2026

Hello ​@ShockFrostArcher 
I recommend you start a reduce the range of choices using STM32 MCU product selector - STMicroelectronics 
then we can discuss which better option for you for the results you got.
>I want to be able to do the programming directly with the MCU soldered to the board
If I understood you correctly in this section , I recommend you use ST-LINK/V2 | Tool - STMicroelectronics in your implimentation
BR
Gyessine

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question.
Associate
October 7, 2026

As per your suggestion I have used the product selector to narrow down. The filters I used are:

  • Marketing: Available for order
  • Package: Only want TSSOP-14/20 or LQFP 32 since I don’t need a lot of pins plus I want to solder by hand
  • Flash Memory Size: At least 32kB (want to be safe, might need more)
  • Other timer functions: RTC
  • SPI: 1 interface

I am uncertain about my RAM requirements, but the selection as of now would leave me with 9 MCUs. How should I proceed now? Or should I reevaluate my filters?

Andrew Neil
Super User
October 7, 2026

I am uncertain about my RAM requirements, 

So go for the one with the most!

It’s far better to find that you’ve got excess than to be stuck with not enough!

For a 1-off, it’s not like you’re counting every last penny in the microcontroller cost.

 

Again, get a Nucleo board - another thing this will do is help you get a feel for how much RAM you actually need.

 

Sorry, I don’t fancy downloading an .xlsx - you can make a table in the forum editor:

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew Neil
Super User
October 6, 2026

Welcome to the forum.

 

I would strongly recommend that you don’t start by designing a custom PCB.

Always start first on a development/evaluation board.

That way you can gain familiarity with the product, the tools, etc, and iron-out any hardware gotchas! before committing to a PCB design.

For an STM32, I would suggest a Nucleo board.

 

As ​@Gyessine already said, use the Product Selector to find an STM32 which matches your requirements.

Once you have identified a suitable STM32, go to its Product Page on the ST website, and look on the ‘Tools & Software’ tab - there it will list suitable dev board.

 

should I use the SW pins

Yes, you should certainly provide access to the SWD pins!

These are not only for programming the device - they are also the debugger interface.

 

PS:

Each STM32 family has an Application Note titled something like “Getting started with STM32xxx hardware design” - be sure to find and study this before starting your PCB design.

Also the Datasheet and other Application Notes - they’ll all be on the Product Page.

 

Before starting on a PCB design

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
MM..1
Super User
October 7, 2026

Simply RAM and FLASH is based on your graphics destination and LCD resolution. For example 320x240 highcolor background require … in FLASH etc. For first learning try STM32F0xxF is 20pin and C is 48 pin. 
32 exist too. 

 

rich.g.williams
Senior
October 7, 2026

Hi ​@ShockFrostArcher  

I had a look at your list and I agree with LQFP 32 package, it is possible to solder this.

if possible go for more Flash and RAM, at least 64KB of Flash.  Go for a mainstream MCU, things like low power etc will complicate things at first.

4K of RAM is enough to get your time display working but its too small, 64K would be much better. To develop your code you can load directly into RAM and run it in RAM.

One way to work is to have two apps a simple startup Flash app and your developing app in RAM when all works it can all go in Flash.

I think you could use ST Core MX  ST Core IDE and ST Core Programmer.

Try to find a ST NUCLEO PCB with the same processor and with STLINK with USB C to connect to ST Core Programmer

 

Bill's Notes
Andrew Neil
Super User
October 7, 2026

I think you could use ST Core MX  ST Core IDE and ST Core Programmer.

Did you mean STM32CubeMX, STM32CubeIDE, and STM32CubeProgrammer ?

 

ST Core Programmer

ST-Link

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
rich.g.williams
Senior
October 8, 2026

​@Andrew Neil 

Oh yes Andrew thanks for catching that, STM32CubeMX STM32CubeIDE and STM32CubeProgrammer, I think they are good tools to get a project going.

I use them a lot to select pins, plan clocking and see the C++ they create. But I now rely on a SPI loader in Flash to boot my development app into SRAM and also use bootloader to program Flash.  

At the moment I am battling to understand how DMA works with linked lists. 

 

Bill's Notes
Associate
October 8, 2026

For a hand-soldered project, I would avoid BGA and very fine-pitch packages. An STM32 in an LQFP package would be much more approachable.

For this clock, you probably do not need a particularly powerful MCU. The ST7735 can use SPI, and the buttons can use ordinary GPIOs. I2C is useful if you later add an RTC or other peripherals.

For programming, I would strongly favor SWD over adding USB just for programming. A small SWD header or test pads makes development much simpler. You can keep USB as a separate feature if the project later needs it.

When selecting microcontrollers, buyers can use Unikeyic to compare manufacturer part numbers, datasheets, and sourcing availability. They have a wide collection of authentic STM boards. 

For a first project, I would also choose a development board using the same MCU family and preferably the same peripheral configuration. That lets you develop the firmware before your custom PCB is finished.

Which STM32 family are you considering so far? That would narrow down the package and development-board recommendations considerably.

Andrew Neil
Super User
October 8, 2026

I would strongly favor SWD over adding USB just for programming..

Absolutely.

And, again, SWD is more than just programming - it also gives the debugger access.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Associate
October 8, 2026

Yes I already removed a lot of devices by only looking through TSSOP and LQFP packages. I also figured that 32 pins should be more than enough for my purpose so I removed LQFP packages with higher pin count.

I am planning to use Adafruit GFX on top of the ST7735 driver, the question is how to find out if a specific MCU is compatible with the library, I have seen a few STM ports of the original ST7735 lib but I don’t know about the compatibility.

The buttons I already planned to realized with normal GPIO plus hardware-level debouncing and the reason why I want to have I2C ready is because I might want to extend my HW design with sensors that communicate via I2C. For now that is beyond the scope of my project, I just intend to expose the SCL and SDA lines so I might design an additional board to be connected with my main board but that is not a concern for my current project.

I would like to avoid USB if possible since it is additional hardware that I would need to implement, I’d rather stick to the standard way with the SWD pins and expose them on my board once I start planning it.

I have posted an updated table (this time as an image) in a reply to Andrew Neil, this is what I have narrowed down with improved specs regarding storage and RAM.

LCE
Principal III
October 8, 2026

As Andrew said: get a Nucleo.

No PCB layout, and you get many of the STM32 pins on headers, and even better:

the Nucleos come with the programming and debugging interface “ST-Link” (via USB), plus a UART (via same USB).

And you might even use the Nucleo supply for the display (just guessing, check that in advance!).

Also check in advance if you get all SPI pins you need on the Nucleo headers.

 

32 kB flash is nothing if you will start with HAL libraries. Probably the HAL clock config, some other inits, and using printf will almost use all of the 32 kB. So better start with at least 64 kB.

For development, always start with the biggest flash / RAM in a MCU series/family. It’s easier to scale down later for production.

Andrew Neil
Super User
October 8, 2026

As Andrew said: get a Nucleo.

I think I might have mentioned it … ?!

;)

 

you get many of the STM32 pins on headers

In fact you get very nearly all of the pins.

Pretty sure all Nudleo-64s provide at least one SPI and at least one I2C on headers.

 

32 kB flash is nothing if you will start with HAL libraries. Probably the HAL clock config, some other inits, and using printf will almost use all of the 32 kB

Not so!

This is a project on the Nucleo-F030:

arm-none-eabi-objdump -h -S nucleo-f030-rtc.elf  > "nucleo-f030-rtc.list"
text data bss dec hex filename
6468 12 1740 8220 201c nucleo-f030-rtc.elf

It uses HAL to configure clocks, RTC, & UART.

Currently, it’s just doing “Hello, World” - using printf. -- Edit: see correction below.

As is my wont, it uses ‘Optimise for debug (-Og)’

With -O0, it is:

   text	   data	    bss	    dec	    hex	filename
9820 12 1740 11572 2d34 nucleo-f030-rtc.elf

which still leaves 70% free even on 32K. 

 

Having said that, I totally agree with:

For development, always start with the biggest flash / RAM in a MCU series/family. It’s easier to scale down later for production

see earlier.

And it’s not like this is even a “production” project.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
LCE
Principal III
October 8, 2026

I stand corrected… I think I started the project on an L01 with 16k - that was terrible.
Then I switched to an L03 with 32 kB - which has 16 bytes free in the final project. :D

I’d go for > 32 kB anyway.

rich.g.williams
Senior
October 8, 2026

​@ShockFrostArcher 

Suggest you go for following:-

STM32C542KCT6 for your custom PCB later on. It is M33 core and LQFP32 package 

 

NUCLEO-C542RC  Development PCB 

it has same MCU in LQFP64. It has USB C for STLINK and STMCubeProgrammer

Bill's Notes