Preventing Thread Preemption on Endpoint

I think I am seeing a case where the code that is supposed to send data to the devices on the SPI bus may be getting preempted by other threads. I don’t know for sure. Apart from trying to optimize ad nauseam, is there any way to indicate to the CPU that this code is running a critical task and not preempt it, even if there are hardware interrupts (e.g. from the USB Host).

If not, then is there a way I can use the Co-Processor to run that code/thread? Perhaps we can run a TinyClr process on it?

Hum. I think a mutex solved my problem. Never mind for now, then.

Also… Co-Pilot’s suggestion totally cracked me up.