Just because the Arduino libraries does things, doesn’t make it right. The Arduino system hides a number of things from you so you might not actually know what is happening.
There is no way to just use FreeRTOS for “part” of a project. Once you start the FreeRTOS scheduler, it does NOT return to the main routine to run the “loop” function. Arduino might if you turn on a FreeRTOS mode just automatically create a task to put the loop function into, so that may be a task that you don’t know about, and you are just fully using FreeRTOS but don’t realize it.
I will state clearly that suspending one task from another is almost always a source of problem, as you do not know what that suspended task was doing at that exact moment, and thus do not know what resources it might have claimed. Also, trying to resume a task the suspends itself needs great care to make sure you don’t accidentally resume the task before it actually suspended itself, and thus the resume gets lost.
Except in very special cases, it is much better to have the task block on a Semaphore or a Notification or the like, and have the other task signal that.
Often your method “works” most of the time, but then at some point you hit a corner case and things just fall apart.
Another thing to remember, unless you have a multi-core processor, the process will only be doing one thing at a time anyway, so spinning up a task to do compute bound operations inside a compute bound task doesn’t actually help you, but perhaps using a timer to schedule them at the required times might be useful.
