Page 2 of 2

Re: Running FreeRTOS only on first core ...?

Posted: Mon Dec 26, 2016 6:56 am
by ESP_Sprite
Also, do take note that in general running a task in a never-ending core is not an entirely good idea. That way, you'll starve the idle task, which is needed for some housekeeping things like cleaning up deleted tasks. Also, when you do this the task watchdog will (rightfully) complain that something is using up all CPU power. In theory, if you know what you're doing and allow e.g. the idle task on the other CPU to run everything could work okay, but also from a power use PoV it's still not a good idea to just run a while loop without yielding.

(By the way: yielding can happen explicitly, by eg doing a vTaskDelay, but also implicitely, by for example waiting until LWIP has received a packet from a socket, or waiting for a FreeRTOS queue to get any data.)

Re: Running FreeRTOS only on first core ...?

Posted: Fri Jan 24, 2020 2:56 am
by fngStudios
Hi, is it possible to run freeRtos in one core and no os on the other core?
We are working in a project that needs precise timing and reading a SPI slave fast. The problem is that we need to read a few bytes many times so the os overhead (task switching, etc) is a pain.
We thought on pinning SPI tasks to one core and the rest of the code (wifi and some minor DSP) on the other but the delay between interrupt and reading SPI is still noticeable.
Is it possible to run plain c in one core and put data on shared memory (FIFO) to be used by the RTOS core?
And if it's possible, how can I do it? what should I do to create code that runs on the no os core? How do I compile/upload code to the non-os core?

Thank you.