First, the real-time nature of embedded systems
The embedded system is application-centric, based on computer technology, and can be tailored for hardware and software. It is suitable for application-specific computer systems with strict requirements on function, reliability, cost, size and power consumption. High real-time performance is The basic requirements of embedded systems.
The IEEE (American Institute of Electrical and Electronics Engineers) defines real-time systems as "systems whose correctness depends not only on the logical result of the calculation but also on the time it takes to produce the result." Real-time systems can be generally divided into two categories: hardware real-time and software real-time: hard real-time systems have a mandatory, unchangeable time limit, which does not allow any errors that exceed the time limit. A timeout error can cause damage or even a system failure, or the system can't achieve its intended goal. The soft real-time system's time limit is flexible and flexible, and it can tolerate occasional timeout errors. The consequences of failure are not serious, only a slight reduction in system throughput.
Second, interrupt response time
The real-time nature of the interruption is an important aspect of the real-time system. Interrupt response time is the main factor affecting the real-time nature of the interrupt. The interrupt response is defined as the time from the interruption of the interrupt to the start of execution of the user's interrupt service code to handle the interrupt [1>, including the interrupt delay time and the time to protect the interrupted site. All real-time systems must turn off the interrupt before entering the critical section code segment, and then open the interrupt after executing the critical code. The interrupt delay time is the time from the issuance of the interrupt request to the task open interrupt [1>. The protection interruption site has two functions. The first is to protect the scene of the task before the interruption. Second, if interrupt nesting occurs, the scene of the upper interrupt must also be protected. Therefore, the entire interrupt response process is shown in Figure 1. For the interrupt service to be processed as quickly as possible, the interrupt response time must be reduced. However, it can be seen from the figure that the interrupt delay time is determined by the pre-interrupt task. When the interrupt is entered, the interrupt response time can be reduced by shortening the time of interrupting the field protection as much as possible, thereby improving the real-time of the interrupt.
Figure 1. Schematic diagram of the interrupt response
Third, the interruption of on-site protection improvements
3.1 Traditional Interrupted Field Protection Method
For most embedded operating systems today, the first thing to do when entering an interrupt is to protect the scene before the interrupt occurs, ie save the return address, the program status word, the stack pointer, and all the general-purpose registers to the interrupt stack to prevent the user. Interrupt the service subroutine to destroy the scene after the interrupt is returned. Taking the μC/OS-II microkernel as an example, the process of saving the scene after entering the interrupt on the arm and X86 architecture microprocessors is shown in Fig. 2. As can be seen from the code, in the two different architectures, in order to protect the scene, three memory fetch instructions need to be executed, one of which is a bulk fetch instruction (STMFD SP!, {R0-R12} and PUSHA) to protect the general-purpose registers. R0-R12 and AX, CX, DX, BX, SP, BP, SI, DI.
Figure 2. μC/OS-II interrupt field protection on arm, X86
Planar Non Tactile Membrane Switch
Planar non tactile film switch: long service life, but no touch.
Film convex touch type film switch: good touch, but relatively short service life.
Convex frames type no touch film switch: beautiful appearance, strong three-dimensional sense, but no touch.
Membrane Switch,Planar Non Tactile Membrane Switch,Membrane Keypad,Membrane Keyboard
KEDA MEMBRANE TECHNOLOGY CO., LTD , https://www.kedamembrane.com