<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class=""><div class=""><br class="">Message: 3<br class="">Date: Thu, 9 Nov 2017 08:35:41 -0500<br class="">From: Scott Hall <<a href="mailto:scottghall1@gmail.com" class="">scottghall1@gmail.com</a>><br class="">To: <a href="mailto:triembed@triembed.org" class="">triembed@triembed.org</a><br class="">Subject: Re: [TriEmbed] ATSAMD21G18 or Arduino Zero interrupts<br class="">Message-ID: <<a href="mailto:821083cc-d097-3b71-2dbf-e7ac92faf3fa@gmail.com" class="">821083cc-d097-3b71-2dbf-e7ac92faf3fa@gmail.com</a>><br class="">Content-Type: text/plain; charset="utf-8"<br class=""><br class="">I just got through reading an article on the Feather M0 (I just bought 3 of them<br class="">for experimenting on) and indeed you are only going to get 1 interrupt to work<br class="">with the default setup in some cases.<br class=""><br class="">Even using the TimerOne library, both the author and the others on the forums<br class="">state that it could be incompatible with SAMD architecture.<br class=""><br class="">The issue is that some interrupts are shared between pins.? If you go look at<br class="">the pinout page for the M0 on Adafruit's site, the image which shows the layout<br class="">and pin information included info on the interrupts:<br class=""><a href="https://learn.adafruit.com/adafruit-feather-m0-basic-proto/pinouts?" class="">https://learn.adafruit.com/adafruit-feather-m0-basic-proto/pinouts?</a> The<br class="">following pins share external interrupts in the zero variant:<br class=""><br class="">  * |EXTERNAL_INT_2|: A0, A5, 10<br class="">  * |EXTERNAL_INT_4|: A3, 6<br class="">  * |EXTERNAL_INT_5|: A4, 7<br class="">  * |EXTERNAL_INT_6|: 8, SDA<br class="">  * |EXTERNAL_INT_7|: 9, SCL<br class="">  * |EXTERNAL_INT_9|: A2, 3<br class="">  * |EXTERNAL_INT_10|: TX, MOSI<br class="">  * |EXTERNAL_INT_11|: RX, SCK<br class=""><br class=""><br class="">Check out section 20 "EIC - External Interrupt Controller" of the datasheet:<br class=""><a href="https://cdn-learn.adafruit.com/assets/assets/000/030/130/original/atmel-42181-sam-d21_datasheet.pdf?1453847579" class="">https://cdn-learn.adafruit.com/assets/assets/000/030/130/original/atmel-42181-sam-d21_datasheet.pdf?1453847579</a><br class="">for the low-level setup and using the external interrupts.<br class=""><br class="">One poster complained "the code that Adafruit provides for their Feather M0 is<br class="">clearly not properly setting the processor up for interrupts".<br class=""><br class="">I hope some of this helps.<br class=""><br class="">- sgh<br class=""></div></div></blockquote></div><div class=""><br class=""></div><div class=""><br class=""></div>I can live with just one interrupt. What’s screwing me is I can not detach an interrupt (for the button) and then attach another (for the LIS3DH) without a lockup.<div class=""><br class=""></div><div class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class="Apple-interchange-newline">|\ |  (¯  \/ |¯\  |V| |\ ¯|¯ |¯) | \/ | | | |¯\ (¯   /¯  /\ |V|</div><div style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">|-||_ (_  /\ |_/ @| | |-| |  | \ | /\ |^| | |_/ (_ . \_  \/ | |</div><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br style="color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">
</div>
<br class=""></div></body></html>