STM32 Interrupt Priority level

Source: Internet
Author: User

M3 with 8bits and STM32 with high four bits to represent preemption and sub-priority: Bit=1 for preemption, bit=0 for non-preemption that is sub-priority, so there are 5 scenarios in the group:

Description of the grouping Bit7 Bit6 Bit5 BIT4:

Group No. 0 0 0 0 0

Group 1th 1 0 0 0

Group 2nd 1 1 0 0 preemption Total 2^2=4 (0~3), sub-priority 2^2=4 (0~3), total 4*4=16 level nesting

Group 3rd 1 1 1 0 preemption Total 2^3=4 (0~7), sub-priority 2^1=2 (0~1), total 8*2=16 level nesting

Group 4th 1 1 1 1

Who is the priority: the smaller the number, the higher the priority, the smaller the preemption-level number, the larger

1 preemption is the same, sub-priority is different: no preemption deprivation at this time, sorted by sub-priority order

2 preemption and sub-priority are the same but have successively: at this time no preemption deprivation, according to FIFO, the previous implementation of the latter can be done;

3 preemption and sub-priority are the same and arrive at the same time: order by interrupt vector table

STM32 Interrupt Priority level

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.