I recently had an embedded project idea that requires a graphical user interface (GUI) on an LCD screen and the use of a computer mouse. The STM32F429I-DISCO board, with its onboard STM32F429ZIT6 microcontroller, is perfect for this application. With the free (as in beer) tools that ST has released, and the STemWin and/or TouchGFX graphics libraries that have been made available, I figured that it would be trivial to get a simple GUI up and running on this board.
Of course, reality came crashing down around me.
So, after putting the pieces of the puzzle together, I thought I'd share with you my attempt at creating a GUI program from scratch for the STM32F429 discovery board. Like I did in my series on building a toolchain for the STM32 processors (which, by the way, you shouldn't use any more now that ST and AC6 have released System Workbench for STM32), we'll do this the long way, so that we learn what each step along the way does. We'll visit many of the STM32F429's integrated peripherals along the way. By the end of this series of blog posts, you should have a solid understanding of how to build a GUI program (and, by extension, just about any program) from scratch for the ST series of processors.
Note that I'm not done writing this stuff yet, and I don't know for sure where I'll end up, but I have some Big Plans ahead!
Now admittedly, I’ve been away from electronics for a while. Between getting a divorce, getting married, and returning to graduate school (and graduating!), there’s been a lot going on. But I'm ready to get back on the horse and get the ol' soldering iron warmed up again. Since the best way to learn is by teaching, I figured I’d re-familiarize myself with the chip by writing a series of tutorials. Over the following days and weeks (all right, likely months and perhaps years), I’ll publish the following tutorial articles (list subject to editing in the future; last edit 2/4/19):
- Exploring the STM32F429: the Stuff you Need to Know
- Exploring the STM32F429-DISCOVERY: the Stuff you Need to Know
- Installing and Configuring the Development Environment
- Building a Skeleton Project
- GPIO: Light an LED when the Button is Pressed
- Exploring the Code and System Startup
- Going it Alone: GPIO Without the HAL
- Semihosting: Debug Nirvana for Microcontrollers
- The NVIC and EXTI: Driving the LED From Interrupts
- Timers: Blinking a LED
- Timers: PWM with Output Compare
- Timers: Fun with Input Capture
- Timers: Decoding Rotary Encoders
- GPIO: The Down and Dirty Details
- Internal and External Clock Sources and Clock Configuration
- The Advantage of A Hardware FPU
- Oodles and Gobs of ROM!
- The FSMC and External Memories: Oodles and Gobs of RAM!
- RTC: Keeping Track of Time, and Low-Power Modes
- ADC: Reading a Potentiometer
- DAC: Sound from Bytes
- DMA: Moving Data Without the CPU
- USB Device: Pretending We’re a Joystick
- SPI: Reading the On-Board Gyroscope
- I2C: Writing to a Character LCD
- I2C: Reading from a Distance Sensor
- UARTs: Communicating with GPS or a Host Computer
- SDIO and the FAT Filesystem
- USB Host and the FAT Filesystem
- USB Host and HID Devices
- USB Device: Talking to an Upstream Computer
- Graphics: Using the Onboard LCD
- FreeRTOS: Lightweight Multithreading
There are a few peripherals that either don’t interest me, or for which I don’t have the experience, skills, hardware, or just the desire necessary to write a tutorial. I won’t be discussing the CAN interfaces (used primarily for talking to computers in your car), the camera interface, or the Ethernet interface. I also won't be talking about Mbed integration.
If you’d like to follow along with me (and I hope you do!), you’ll need the following hardware:
- An STM32F429I-DISCOVERY board (either the DISCO or the DISC1 variant)
- A small breadboard (better yet: several breadboards)
- A pushbutton that'll fit into the breadboard
- Jumper wires (M-F)
- An LED and appropriate current-limiting resistor for 3.3V
- A potentiometer breakout board, or breadboard-able potentiometer
- An SD card breakout board and an SD Card
- A USB thumb drive (any size)