STM32 Programming Resources

Post Reply
User avatar
Jack Bauer
Posts: 3563
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 1 time
Been thanked: 87 times
Contact:

STM32 Programming Resources

Post by Jack Bauer »

As someone with little to no experience in high level embedded programming I have been endevouring to train myself on programming the STM32F1 in particular. To that end I've filtered through a good bit of stuff and thought would put together a list of resources and info that I have discovered.

This book is excellent and the source code for all the examples is free on github :
https://www.apress.com/gp/book/9781484236239

This blog on STM32 and libopencm3 also has its sources free on github:
https://rhye.org/post/stm32-with-opencm ... nd-printf/

This book is a fantastic refference :
https://www.amazon.com/STM32F103-Arm-Mi ... B07Z268HY4

If anyone else has other recommendations please do contribute.
I'm going to need a hacksaw
deanusjack
Posts: 6
Joined: Tue Nov 24, 2020 7:14 pm
Location: England, UK

Re: STM32 Programming Resources

Post by deanusjack »

One of the most powerful things with the ST embedded stuff especially is the portability between different silicon, it may take some extra work to get used to hardware abstraction layers but for code often recycled, its definitely worth the extra time. There is a lot of information out there but so much is irrelevant or poorly worded, I can definitely also recommend Beginning STM32 by Warren Gay as a solid starting point, also great for reference.

The STM boards are generally fairly expensive in comparison to the usual arduino clones, with the exception of the blue pill etc, its worth noting that if you can manage a soldering iron you can make your own bare bones setup with only a breakout board and get up running fairly quick. There's many tutorials but the following is pretty good :
http://kevincuzner.com/2016/05/22/dev-b ... ev-boards/

Like kicad and some other programs, STM32CubeMX is great, but the information is quite often out of date so I won't post too much direct to anything here, start with ST's documentation and work from there is usually a good bet. Its great for using once you've worked out what peripherals etc you need, you can find a suitable part and check your pin mappings won't be an issue, as unlike some of the older ATMegas/Arduino boards, people are often caught out that many pins have multiple uses. Just because you have 3 UARTS, doesn't mean you can use them all if your using X Y Z. It also generates your base code to configure your peripherals so you don't have to do that, another trap coming from Arduino land, and has some middleware components built in such as TCP/IP, USB etc.

ST Page https://www.st.com/en/ecosystems/stm32c ... l#overview

ST Tutorial Video
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: STM32 Programming Resources

Post by jon volk »

I’ve picked up a lot from Eddie Amaya’s videos. His tutorial on writing your own drivers made a bunch of stuff click that was always just background magic using Arduino based stuff.

https://www.youtube.com/user/sdf3e33
Formerly 92 E30 BMW Cabrio with Tesla power
jon volk
Posts: 572
Joined: Wed Apr 10, 2019 7:47 pm
Location: Connecticut
Been thanked: 2 times

Re: STM32 Programming Resources

Post by jon volk »

I'm about 3/4 of the way through this series and found it to be very informative. It is not specifically related to STM32, but a more broad overview of ARM microcontrollers and C. The part I found most informative was the use of disassembly and register views for debugging in almost every lesson. The first few have some very basic info and setup information, however there do seem to be important bits that flow into the remaining lessons so Id say stick through them. There were quite a few lightbulb moments for me from the series.



I also found this to be a good listen as well with a focus on embedded systems reliability. It doesn't go overly deep, but brings up some interesting thought exercises.

https://podcasts.apple.com/us/podcast/c ... d605801131
Formerly 92 E30 BMW Cabrio with Tesla power
Post Reply