Ucos Clock and interrupts:

Source: Internet
Author: User

1: Interrupt handler function: OSTICKISR ()//Its call to Ostimetick (),

The 2ucosii clock beats 10~100hz and the clock beats are turned on after Osstart. After each clock beat, the clock interrupt function adds 1 to the timer, while traversing all the deferred task function blocks to reduce its delay by one and make the deferred task go into readiness.

3 Task delay: UCOSII rules: Any task outside the idle task is to call a time delay function, in order to perform a task scheduling, let out the CPU use.

4 Get and set the system time: After Osstart, start each clock beat increment one through function good can get and reset change in, time.

Interrupts and shielding interrupts: there are three ways to enter the critical section to protect the code from interruption

Ucos Clock and interrupts:

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.