# Does single core FreeRTOS in a dual core RP2040 use just one core?

**URL:** <https://forums.freertos.org/t/does-single-core-freertos-in-a-dual-core-rp2040-use-just-one-core/20847>\
**Category:** Kernel\
**Created:** [June 28, 2024, 4:43pm UTC](https://forums.freertos.org/t/does-single-core-freertos-in-a-dual-core-rp2040-use-just-one-core/20847 "2024-06-28T16:43:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mjohannessen](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/mjohannessen/32/4741_2.png) [@Mjohannessen](https://forums.freertos.org/u/Mjohannessen)\
**Post date:** [June 28, 2024, 4:43pm UTC](https://forums.freertos.org/t/does-single-core-freertos-in-a-dual-core-rp2040-use-just-one-core/20847/1 "2024-06-28T16:43:27Z")

</div>

I am developing an ROS2 application (using MicroROS) on a RP2040 (Raspberry Pico) and FreeTROS. The current FreeRTOS SMB branch appears to be problematic on this device and crashes somewhere in the ROS2 publishing and subscribing routines. I moved to using the non-smb branch and thus “single core FreeRTOS”, with configUSE\_CORE\_AFFINITY set to 0. A very basis question - does using “single core FreeRTOS” really use just one of the two RP2040 cores, leaving one core dormant, or are both cores actually used with the scheduler?

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [July 1, 2024, 6:06am UTC](https://forums.freertos.org/t/does-single-core-freertos-in-a-dual-core-rp2040-use-just-one-core/20847/2 "2024-07-01T06:06:39Z")

</div>

> [@Mjohannessen](#):
>
> I moved to using the non-smb branch and thus “single core FreeRTOS”,

Assuming you are taking about the [FreeRTOS-Kernel](https://github.com/FreeRTOS/FreeRTOS-Kernel) repo, the current main branch has code for both single core and SMP.

> [@Mjohannessen](#):
>
> A very basis question - does using “single core FreeRTOS” really use just one of the two RP2040 cores, leaving one core dormant, or are both cores actually used with the scheduler?

It depends on the value of `configNUMBER_OF_CORES`:

- If `configNUMBER_OF_CORES` is set to 1, only one core is used.
- If `configNUMBER_OF_CORES` is set to 2, both the cores are used.

This is a single core example for RP2040 - [FreeRTOS-Community-Supported-Demos/CORTEX\_M0+\_RP2040/Standard at main · FreeRTOS/FreeRTOS-Community-Supported-Demos · GitHub](https://github.com/FreeRTOS/FreeRTOS-Community-Supported-Demos/tree/main/CORTEX_M0%2B_RP2040/Standard).  
This is an SMP example for RP2040 - [FreeRTOS-Community-Supported-Demos/CORTEX\_M0+\_RP2040/Standard\_smp at main · FreeRTOS/FreeRTOS-Community-Supported-Demos · GitHub](https://github.com/FreeRTOS/FreeRTOS-Community-Supported-Demos/tree/main/CORTEX_M0%2B_RP2040/Standard_smp).
