Yes, you can. Basically, call portDISABLE_INTERRUPTS (and portENABLE_INTERRUPTS after you're done) and the interrupts on that core should stop firing, stopping task switches as well. Be aware that dependent on what you do, instructions may still not execute at the same speed because of e.g. bus cont...