With timer interrupt, single chip microcomputer interrupt processing time is greater than timer timing?

Source: Internet
Author: User

With timer interrupt, single chip microcomputer interrupt processing time is greater than timer timing?

If the interrupt type is different, it can be nested according to priority, if it is the same interrupt type (such as the title),
There are three kinds of results: 1, immediately into the new interrupt processing (interrupt nesting) 2, wait for the interrupt processing and then enter the new interrupt processing 3, error.

Single-chip processor interrupt processing time is greater than the timer time, at the next interrupt time, because the interrupt is the same type, the same priority, so will not immediately enter the new interrupt processing.
But at the end of this interrupt processing, the microcontroller immediately into the new timer interrupt function, the main function of the statement may not have the opportunity to run down, will affect the real-time of the subsequent interrupts. So the answer is 2.

If in order to avoid the interruption of nesting (the same priority does not occur), in the interrupt processing of the man in the interrupt when the interrupt, after processing the interrupt after the interruption, will affect the real-time of the subsequent interrupts.

The safest way to handle it: the shorter the interrupt processing time, the better, and what to do with the outside. The purpose of the interruption is to improve the real-time system, interrupt processing is too long, will affect the level of interrupt response, other interruptions talk about real-time.

Attached: Solve the problem of interrupt processing for high speed and large amount of data
1. In the interrupt, only receive. Or add a simple judgment. 2, in the main program processing.

With timer interrupt, single chip microcomputer interrupt processing time is greater than timer timing?

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.