# How long (cycles) is a yield on a Cortex-M0+?

**URL:** <https://forums.freertos.org/t/how-long-cycles-is-a-yield-on-a-cortex-m0/6583>\
**Category:** Kernel\
**Created:** [May 11, 2017, 1:21pm UTC](https://forums.freertos.org/t/how-long-cycles-is-a-yield-on-a-cortex-m0/6583 "2017-05-11T13:21:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [May 11, 2017, 1:21pm UTC](https://forums.freertos.org/t/how-long-cycles-is-a-yield-on-a-cortex-m0/6583/1 "2017-05-11T13:21:12Z")

</div>

**[ljskinny](https://sourceforge.net/u/ljskinny/)** wrote on [Thursday, May 11, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/24bec013/#927b):

Hi all,

We have a strange problem in using a time critial interrupt (samplin input) in conjunction with the freeRTOS.

my first question is, how long a yield is, which uses the critical section and disables the global interrupts.

So this could be the reason for blocking the interrupt.

I would expect, that the yield should not block that long the interupt or i am i something missing?

Any ideas are welcome. I have to check, if the RTOS itself is the problem for the issues in our application.

Best regards

Holle

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [May 11, 2017, 2:30pm UTC](https://forums.freertos.org/t/how-long-cycles-is-a-yield-on-a-cortex-m0/6583/2 "2017-05-11T14:30:23Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Thursday, May 11, 2017](https://sourceforge.net/p/freertos/discussion/382005/thread/24bec013/#927b/f45f):

If you are referring to the context switch time then you can find some  
information for a Cortex-M3 on the link below. An M0 will be a bit  
slower due to its more limited instruction set.

Also unlike an M3, the M0 will globally disable interrupts in a critical  
section - do you have long critical sections?  
(taskENTER\_CRITICAL()/taskEXIT\_CRITICAL)

[http://www.freertos.org/FAQMem.html#ContextSwitchTime](http://www.freertos.org/FAQMem.html#ContextSwitchTime)
