RTOS interrupt articles - summary
overview
This section mainly involves the summary of interrupts, and re-discussion on interrupt nesting, interrupts and shared resource protection of interrupts.
Summarize
Interrupts are actually the category of bare-metal programming. Devices enter different processing programs through interrupts. RTOS is a large-scale software driven by SysTick.
Interruption is the ability of the device itself, just as a person uses the five senses. People use their five senses to understand what is happening in the outside world, and devices judge what is happening in the outside world through interruptions.
Regarding interrupts, our chapter mainly involves the following aspects:
1) This chapter first introduces the knowledge related to interrupts, and the support and usage of interrupts in ESP32, and introduces two basic interrupts-GPIO interrupts and timer interrupts.
2) Secondly, this chapter introduces the communication mechanism in interrupts. By using the communication components ISR
with , interrupts can establish communication with other interrupts, interrupts and tasks, to achieve event synchronization and data transfer, and introduce the communication between interrupts and task selection. General principles of the mechanism.
3) Again, this chapter introduces the method of protecting shared resources related to interrupts. The protection of shared resources between interrupts can be realized through critical sections, off-designated interrupts, and resource guardian mechanisms.
name | Advantage | insufficient |
---|---|---|
critical section | Simple to implement and fast to operate | During the shutdown period, the global interrupt will be turned off |
off specified interrupt | Affects closed interrupts only | none |
Resource Guardian Mechanism | does not affect the triggering of the interrupt | Need to consume additional resources to establish a communication mechanism, which may cause a delay in interrupt response |
4) Finally, the chapter