Details of each peripheral
Serial communication SPI[SPI details of STM32]

This section explains how to use the STM32's built-in peripheral SPI. In this chapter, reading and writing data to and from an SPI-specification EEPROM is explained as an example. Table of contents1 What is Serial Communication SPI?2 SPI initialization procedure3 SPI Byte Sending/Receiving4 EEPROM write5 EEPROM read What is Serial Communication SPI? SPI initialization procedure […]

Read more
Details of each peripheral
Serial communication I2C[I2C details of STM32]

This section explains how to use the STM32's built-in peripheral I2C. This chapter explains how to read and write data to an I2C-specification EEPROM as an example. Table of contents1 What is serial communication I2C?2 I2C initialization procedure3 I2C type EPROM writing4 I2C type EEPROM read What is serial communication I2C? I2C initialization procedure Purpose: […]

Read more
Details of each peripheral
Serial communication USART [USART details of STM32]

Serial USART communication is a peripheral that can be applied to IoT in the future and should be mastered as early as possible. USART is relatively simple to set up as a peripheral, but because it handles character strings, it requires C programming skills to master its use. This section provides step-by-step explanations from receiving […]

Read more
Details of each peripheral
AD converter [ADC details of STM32]

Because the STM32 MCU's AD converters are so sophisticated, it is recommended that beginners step up to them, starting with the simplest ones and understanding them in turn. This chapter describes the single-mode conversion method, in which a single channel analog input is manually acquired only when necessary, to the method in which multiple channels […]

Read more
Details of each peripheral
Various interrupts [Interrupt details in STM32]

Interrupt processing is unavoidable in embedded programming that controls hardware. Interrupt processing in the STM32 MCU is based on the rules of the ARM Core Cortex-M3, so it is necessary to understand how the rules work and to write the interrupt processing settings and processing details. This chapter explains the interrupts specific to the ARM […]

Read more
Details of each peripheral
Timer/Counter[STM32 Timers Details]

Timer counters on MCUs have a wide range of applications, such as counting the number of input pulses given externally, calculating input pulse frequency, outputting arbitrary frequency pulses, outputting PWM pulses, and measuring time with timer counter combinations other than pulses. The timer/counter peripheral of the STM32 has so many functions that it is difficult […]

Read more
Details of each peripheral
System timer[SysTick timer details for STM32]

 Interrupt with divided 9 MHz system clock as SysTick timer:  ① Set counter value for SysTick timer   ② Specify system clock source The argument can be either the AHB clock as it is or a clock divided by 8. ■ SysTick_CLKSource_HCLK : AHB clock as is■ SysTick_CLKSource_HCLK_Div8 : AHB clock divided by 8  ③ Description of Interrupt Processing

Read more
Details of each peripheral
System Clock[SysClk setting details for STM32]

The system clock is microcontroller-specific, so once it is set, it is not something that should be changed. However, a thorough understanding of the system clock will enable its application to other microcontrollers. Table of contents1 Clock of MCU2 Clock source type3 Clock Setting Clock of MCU Clock source type Clock Setting  ① RCC System […]

Read more
Details of each peripheral
General Purpose I/O GPIO[usage details of STM32]

In this section I explains in detail how to use the general-purpose input/output GPIOs of the STM32 MCU. To be able to use GPIO, the most basic and frequently used of the peripherals, requires not only programming but also an understanding of the electronic circuits that make up the interface, and therefore, an understanding of […]

Read more
What are MCU peripherals?
How to read the ARM STM32 register map [for advanced users]

Table of contents1 Register map2 Description in the program using the library3 About initialization function xx_Init() Register map Next, checking the contents of GPIO control registers, there are 7 types of control registers as follows (x=A…G). Port Setting Register Lower(GPIOx_CRL)Port0 to 7 Port Setting Register Upper(GPIOx_CRH)Port8 to 15  Port Input Data Register(GPIOx_IDR) Port Output Data […]

Read more