Cortex-M3 core commands

Source: Internet
Author: User

1. _ DSB () command:

Data Synchronization barrier, this function acts as a special kind of data memory barrier. It completes when all explicit memory accesses before this instruction complete.

Instance (the clock source frequency of timer is lower than the MCU clock speed ):

Void timer0_irqhandler (void)
{
/* Clear interrupt source */
Timer-> IFC = timer_ifc_of;
/* Flushing instructions to make sure that the interrupt is not re-triggered */
/* This may be required when the peripheral clock is slower than the core */
_ DSB (); // wait until the ram access is completed to prevent repeated interruptions.

/* Stopping timer */
Timer-> cmd = timer_assist_stop;

}

 

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.