Hi, I'm planning on using the Arduino Due for 3-phase commutation for a Brushless DC motor. The motor is 8-pole, and I would like it to run up to 10000 rpm. With 6 commutations pr. electrical rotations, it equals 8000 state changes pr. second which equals 125 micro seconds between state changes. However in order not to loose too much torque, i would like to make the state change within 5% of that period, which means 6.25 micro seconds. I would like to avoid direct port manipulation etc. and instead use digitalRead, analogWrite etc.
So I imagine a process like: React to an interrupt triggered by one of 3 hall sensors - set flag in interrupt routine - check for that flag in main loop before any other processor intensive tasks (like lcd display, PID calculations etc.) - If flag is set then read 3 hall sensor states and analogWrite to the 6 outputs to the half bridge drivers according to the hall sensors (cross conduction and over current is taken care of in hardware).
My question is: Is the Arduino Due able to do the above process in 6.25 micro seconds?
Another question is: Is it possible to do digitalRead on pins that are setup for interrupts.