Discussion on using tasks in ROBOTC

There is a system property called nIfiSPIMsgCounts that increments every time communication occurs with the master processor. This is not any sort of secret, I used it in a thread from 2011 here.

This is the process that retrieves joystick data and sends motor values (It’s actually not all done at interrupt level, interrupt sets a flag that indicates to VM that this work needs to be done and that effectively blocks the user code, this is all scheduled by a 1mS timer tick interrupt). There are many interrupts happening, serial comms, quad encoder reading, I2C communications etc. but, as with most embedded control, we do not spend any significant amount of time in the actual interrupt handlers, a few uS at most.

1 Like