Due interrupts

I'm working on a CNC project and having some trouble with accuracy.

The Due can support interrupts on all pins but I've seen a few threads suggesting that it isn't as simple as that - pins may or may not have a Schmitt trigger behind them and I'm starting to suspect that there is polling involved.

Are there any "true" external interrupt pins on the Due - I only need one?

As per Sam3x datasheet (bottom of pages 13 and 14):

  1. PIOA: Schmitt Trigger on all, except PA0, PA9, PA26, PA29, PA30, PA31
  2. PIOB: Schmitt Trigger on all, except PB14 and PB22
  3. PIOC: Schmitt Trigger on all, except PC2 to PC9, PC15 to PC24
  4. PIOD: Schmitt Trigger on all, except PD10 to PD30

Note that Sam3x8e is only concerned by PIOA,B,C and D (no PIOE and F).

attachinterrupt() function is not super fast, you may need more speed. There are threads in the DUE sub forum explaining how you can use directly PIOx_Handler() for a faster interrupt trigger.

Hopfully this will answer your question.