Running FreeRTOS on both cores

PawelJalocha
Posts: 13
Joined: Tue Apr 24, 2018 9:14 pm

Running FreeRTOS on both cores

Postby PawelJalocha » Sat Apr 28, 2018 1:59 pm

In my application, I have enabled running the FreeRTOS on both cores and then I observed like memory overwrites, at least on the console output. My application would as well become unstable: it would run for an hour or two and then simply stop, not even restarted.

Is there anything to consider when running two cores with FreeRTOS, are there any additional rules to follow ?

When running on a single core is the other core simply unused or does is still do some useful job ?

ESP_Sprite
Posts: 9719
Joined: Thu Nov 26, 2015 4:08 am

Re: Running FreeRTOS on both cores

Postby ESP_Sprite » Sun Apr 29, 2018 3:33 am

It depends: if you use all the FreeRTOS primitives (muxes, queues, etc) for moderating access to resources and multi-tasking correctly, running your code on two cores should need no change in your code. If you don't... well, race conditions can effectively be triggered way more easily in a multicore environment. So it depends more-or-less on how your code is written, I'd say.

PawelJalocha
Posts: 13
Joined: Tue Apr 24, 2018 9:14 pm

Re: Running FreeRTOS on both cores

Postby PawelJalocha » Sun Apr 29, 2018 1:34 pm

Thank you, thus from the programmer point of view the RTOS runs as if there was a single core as long as all the resources are properly protected by the semaphores ?

Is given task run always by the same core or it can be switched between cores ?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: Running FreeRTOS on both cores

Postby WiFive » Sun Apr 29, 2018 8:38 pm


Who is online

Users browsing this forum: No registered users and 71 guests