SAMD21 multiple pins as external interrupt sources

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

 

In the "32-bit ARM-Based Microcontrollers" (SAM D21E / SAM D21G / SAM D21J)

in the section about EIC (paragraph 21.6.6, "Interrupts") there is the note saying:

If an external interrupts (EXTINT) is common on two or more I/O pins, only one will be active (thefirst one programmed).

Does that mean that I can not have multiple pins configured to as an external interrupt, to wake up the mcu, for example?

 

Regards

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

You can configure a particular EIC to more than pin, for example EIC(0) to pin 1 and pin 17 on a SAMD21E, but only the first pin programmed will be active. See section 7 of the datasheet "I/O Multiplexing and Considerations" for configuring EIC pins

You can use up to 16 pins for different external interrupts EIC(0) to EIC(15), just make sure that you don't program two different pins for the same EIC

Jerry

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello jerryr,

 

Thanks! That worked.

 

But apparently, being able to process an interrupt from external pin and waking up the device from deepsleep mode by some signal change on the external pint happened to be two different challenges (at least for me).

 

Whoever played with sleep/wakeup on samd21 mcu - I invite you to discuss tips and tricks there. Especially from sources like RTC. That is probably the most common use case.

 

I will probably put some questions together and make a separate topic for that.

 

Regards

Last Edited: Fri. Jun 22, 2018 - 11:03 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you sure the clock for the EIC and the RTC are set up to run in standby?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, I had to set RUNSTDBY for them. Thanks