Understanding Interrupts in Microcontrollers

Understanding Interrupts in Microcontrollers

The microcontroller’s CPU, while processing an event A, receives a request to quickly handle another event B (interrupt occurs); the CPU temporarily interrupts its current work to process event B (interrupt response and interrupt service); upon completing event B, the CPU returns to the original point of event A that was interrupted to continue processing … Read more

Essential Concepts of Microcontroller Terminology

Essential Concepts of Microcontroller Terminology

Bus: Refers to the information transmission line that serves multiple components. In microcomputer systems, various components communicate with each other through the bus. Address Bus (AB): The address bus is unidirectional and is used to transmit address information. The width of the address bus is 16 bits, thus allowing direct addressing of 64K external memory. … Read more

Step-by-Step Guide to STM32 External Interrupts

Step-by-Step Guide to STM32 External Interrupts

● Interrupts Interrupts play a very important role in microcontrollers. The code executes from top to bottom by default, and when it encounters conditions or other statements, it jumps to specified locations. During the execution of code in a microcontroller, unexpected situations may arise that need to be handled, which will interrupt the current code. … Read more

Detailed Analysis of Interrupt Functions in STM32 HAL Library

Detailed Analysis of Interrupt Functions in STM32 HAL Library

Reminder: This article briefly reviews the relevant knowledge points of EXTI and NVIC, analyzing the external interrupt callback mechanism of the STM32F1 series microcontroller. Before we start, let’s review some knowledge related to EXTI and NVIC: External Interrupt/Event Controller (EXTI) For interconnect products (series 105, 107), the external interrupt/event controller consists of 20 edge detectors … Read more

Detailed Analysis of Interrupt Functions in STM32 HAL Library – NVIC

Detailed Analysis of Interrupt Functions in STM32 HAL Library - NVIC

Reminder: This article takes external interrupt for lighting as an example, analyzing the usage of interrupt service related functions in the HAL library, their interconnections, and underlying principles. 1. Example Implementation Example Overview: The main function controls LED2 to blink, while the interrupt controls the switch of LED0: First, we use CubeMX to create the … Read more

Introduction to STM32 EXTI

Introduction to STM32 EXTI

For STM32, from previous learning, we can know that STM32 refers to the 32-bit microcontroller developed by STMicroelectronics. Today we will learn about the EXTI of STM32. 1. Introduction to EXTI EXTI (External interrupt/event controller) manages the 20 interrupt or event lines of the controller. Each interrupt or event line corresponds to an edge detector, … Read more

Basics of STM32 IoT Kit Part 05 – External Interrupts

Basics of STM32 IoT Kit Part 05 - External Interrupts

Click the blue text above: IoT Inn In the previous section, we learned about the independent key operation of the microcontroller. In fact, we used a polling method, which consumes MCU resources as it constantly checks for key presses. In this section, we will use interrupts to implement key operations. 01 Basic Knowledge 1Introduction to … Read more

Understanding the Interrupt System in STM32

Understanding the Interrupt System in STM32

Little Science Gas Station In embedded learning, the STM32 series chips are particularly favored due to their many excellent features, such as the STM32 MCU integrating a wealth of peripherals, including communication interfaces (like UART, SPI, I2C, CAN, etc.), analog and digital interfaces, timers, and interrupt controllers. Today, Little Science introduces the interrupt system of … Read more

Understanding Interrupt Systems in Microcontrollers and RTOS

Understanding Interrupt Systems in Microcontrollers and RTOS

Abstract: We encounter many operating systems in our daily lives, such as Windows, Android, iOS, and Linux. Microcontrollers also have their own operating systems known as Real-Time Operating Systems (RTOS). So, what are the differences between these real-time operating systems and the ones we commonly use? The operating systems we frequently use are actually non-real-time … Read more