# Switching tasks - timer?

**URL:** <https://forums.freertos.org/t/switching-tasks-timer/2762>\
**Category:** Kernel\
**Created:** [November 14, 2014, 3:01pm UTC](https://forums.freertos.org/t/switching-tasks-timer/2762 "2014-11-14T15:01:18Z")\
**Posts on this page:** 4\
**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:** [November 14, 2014, 3:01pm UTC](https://forums.freertos.org/t/switching-tasks-timer/2762/1 "2014-11-14T15:01:18Z")

</div>

**[witc](https://sourceforge.net/u/witc/)** wrote on [Friday, November 14, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/79c01ee0/#025a):

Dear,

I use CORTEX M4 -(SAM4LC8) with FreeRtos Kernel, I would like to know how the switching of the tasks works. Is there any timer ? which timer? is it RTC?. Because on AVR I used the FreeRtos, where the tasks were switched by timer. I found function vPortSetupTimerInterrupt, but there is nothing like init of any timer, which could swith the tasks.

Thanks in advance for help.

Best Regards. Jan Ropek.

---

<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:** [November 14, 2014, 3:17pm UTC](https://forums.freertos.org/t/switching-tasks-timer/2762/2 "2014-11-14T15:17:32Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Friday, November 14, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/79c01ee0/#c26b):

Assuming you are using a standard rather than tickless port (as there is a tickless implementation for the SAM4L) then it is using the SysTick timer, which is build into the Cortex-M core itself rather than being a separate peripheral.

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [November 16, 2014, 11:04am UTC](https://forums.freertos.org/t/switching-tasks-timer/2762/3 "2014-11-16T11:04:15Z")

</div>

**[witc](https://sourceforge.net/u/witc/)** wrote on [Sunday, November 16, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/79c01ee0/#a878):

OK, and does the SysTick timer tick in sleep mode? in datasheet is not any information about SysTick timer, there is only information about RCSYS - but suppose, that is different timer?!

Regards.

---

<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:** [November 16, 2014, 11:20am UTC](https://forums.freertos.org/t/switching-tasks-timer/2762/4 "2014-11-16T11:20:51Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Sunday, November 16, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/79c01ee0/#a878/f256):

> OK, and does the SysTick timer tick in sleep mode?

That would depend on the sleep mode.

> **[Tickless Low power features in FreeRTOS](https://www.freertos.org/low-power-tickless-rtos.html)**
>
> Low power tickless features in FreeRTOS

> in datasheet is not any information about SysTick timer,

You need to be looking in the ARM Cortex-M datasheet - there is a lot of  
information. Simply Googling “Cortex Systick timer” will overwhelm you  
with information.

> there is only information about  
> RCSYS - but suppose, that is different timer?!

Quite definitely a different timer. Presumably that is a peripheral  
timer that is specific to the device you are using, rather than part of  
the Cortex core.

Regards.
