STM8 's wait for interrupt

Source: Internet
Author: User

If I use disable interrupt and enable interrupt parcel wait Forinterrupt (WFI). Do you think WFI can still be awakened? Have you ever thought about it.

Took Stm8l151k4 's development board last night and actually tested it down. This usage is absolutely no problem. So I guess inside the chip, the core should be dedicated to a signal line to wake up the sleep state of the core, this signal is not affected by interrupt disable.

This experiment is useful for controlling sleep wake Sleep/resume, because you will expect sleep wake Sleep/resume to follow a single thread, otherwise you will not have the opportunity to intercept the resume process, because the core will run out of long-awaited WFI instructions when you resume. Then you jump to the interrupt ISR, and you don't have a chance to intercept it at all. This leads to the absence of a unified entry and exit for the Sleep/resume, and the necessary recovery work to be done when it wakes up.

This experiment will be extended to the halt directive. Lay the groundwork for the next power optimization.


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.