SAMD21 NMI Interrupt on Autonomo


How does one configure the NMI interrupt on port PA08 ? I have connected a button on this pin which I can’t move to the other pins with Ext interrupt features.

There are EXT INT[0]-[15] and one NMI available on this processor. I want (have to) use the NMI.

The NMI interrupt support was removed in Sept 2015. First in the main Arduino core and then in our fork. I can’t remember why this was done exactly.

You can see the repository commit here:

It seems all that you need to do is modifiy the EIC-NMICTRL.reg to specify which detection mode. You probably want to attach another interrupt first or look how Arduino configures the interrupt clocks.

Then you need to write the NMI interrupt handler (this can exist anywhere in the code) which at a minimum should clear the interrupt flag:

void NMI_Handler( void )	
  // Do stuff	
  // Clear the interrupt	

Great! Thanks for the git reference and feedback, much appreciated