MCU learning (a) interrupt, timer, some understanding of the priority

 

The following is only understood in a more common scenario, incomplete, reference need to be cautious.

 

1, main file, while circulation stated in the statement executed sequentially. Many will be performed during interrupt, timer service.

 

 2, the signal point of view, such as the ultrasonic modules have high and low points, the procedure there is rising or falling. Capture interrupt signal may rise or fall, and then captured, execute the interrupt function.

3, the external interrupt: the signal coming external sensor module;

Internal interrupts: internal configurable timer.

 

4, the priority is divided into priority and preemption priority response.

Such preemption priority 0 1 2 3

In response to the priority 0 1 2 3

At the same time there is interruption A, B:

If performed before A, B and then executed, preemption priority A <B, A is executed first, and then continue executing the A B;

If performed before A, B and then executed, preemption priority A = B, A is executed first, and then continue executing the A B;

If A, B concurrently, a large preemption priority first implementation;

If A, B simultaneously executed, the same preemption priority, the priority is determined in response to, in response to execution priority large.

Guess you like

Origin www.cnblogs.com/JuiceCat/p/12043508.html