Is there a limit to how much code the cortex can run at once? Our team has over 1800 lines of code and is running 3 tasks simultaneously. Is there any chance that we are over-stressing the cortex?
Yeah, 1800 lines would probably do it.
The cortex can effectively execute only one instruction at a time. You’ll find limits based on how large your compiled code is and limits based on how much memory you have. If I remember correctly, you have something like ~350 KB of memory available on the Cortex. What are you observing that makes you think you are over-stressing the Cortex?
If you dont put your tasks to sleep at the end of each cycle you may experience some issues that may seem like you are overtaxing the cortex. If you dont already, add a wait1Msec(25); at the bottom of each task’s main while loop. See if that helps.
@edjubuh Our cortex seems incapable of doing some basic arithmetic, for example, it can’t do 1 - (-1).
@8232X I tried that, and it seemed to help, thanks.
Glad it did, most likely the tasks were fighting for control, without a sleep to let others complete their lines of code.