These introductory and comprehensive STM32 tutorials are contributed by Shawon Shahryiar, a technologist, hardware maker, educator and EEE graduate from Ahsanullah University of Science and Technology, Dhaka to allow quick learning of ARM processor programming and interfacing.
STM32 ARM-based micros from STMicroelectronics pack high density resources than any other conventional microcontroller. They are also high speed devices, operating typically at 72MHz and beyond. The aim of this document is to address some common FAQs regarding STM32 prior to start developing applications with them.
The I/O ports in STM32 are usually named as GPIOA, GPIOB, etc. and are 16 bit wide. The port pins have several modes of operation, which makes them both robust and complex at first. In this tutorial, we will discuss how to configure and setup these ports for I/O operation and illustrate with a basic LED blinking example.
This tutorial talks about ST SPL, which is a collection of hardware libraries that provide an easy approach to any STM32 ARM programmer. It has support for every peripheral a STM32 micro has like CAN, USB, ADC, Timers, etc. In short it’s a hardware abstraction layer fully covering the STM32.
STM32 provides hardware USART ports for serial communication. As we all know serial communication is a very important tool for debugging, connecting with external hardware like RFID, GPS, GSM modems, etc. and for performing other communication-related tasks. The number of serial ports available in a STM32 micro is dependent on device family type and the device itself.
ST-Link 1 (AKA ST-Link) and ST-Link v2 are both basically the same programmer/debugger hardware with some minor exceptions. ST-Link 2 has 5V tolerance for JTAG interface, it has a bicolour status LED and it also has a separate programming interface for STM8 micros unlike ST-Link 1. There is also an ISOL version of ST-Link2 that galvanically isolates it from its target using optoelectronics.
STM32F1xx series are ARM Cortex M3 based MCUs. The Cortex M3 based MCUs have a sophisticated and yet easy to use interrupt system called the Nested Vectored Interrupt Controller (NVIC). It ensures low latency and high performance. There are several features of the NVIC and these are handled by the compiler. Our job is simply to enjoy the lightning fast interrupt responses owing to the NVIC.
Most of us know about watchdog timers from previous experiences with common 8 bit MCUs like AVR and PIC. However when it comes to STM32 the idea of watchdog circuitry is elaborated. The options available for clock are also enhanced in the STM32 micros. In this post, we will see some of these supporting internal hardware.