[TriEmbed] ATSAMD21G18 or Arduino Zero interrupts

Alex Davis alexd at matrixwide.com
Thu Nov 9 10:00:40 CST 2017


> 
> Message: 3
> Date: Thu, 9 Nov 2017 08:35:41 -0500
> From: Scott Hall <scottghall1 at gmail.com>
> To: triembed at triembed.org
> Subject: Re: [TriEmbed] ATSAMD21G18 or Arduino Zero interrupts
> Message-ID: <821083cc-d097-3b71-2dbf-e7ac92faf3fa at gmail.com>
> Content-Type: text/plain; charset="utf-8"
> 
> I just got through reading an article on the Feather M0 (I just bought 3 of them
> for experimenting on) and indeed you are only going to get 1 interrupt to work
> with the default setup in some cases.
> 
> Even using the TimerOne library, both the author and the others on the forums
> state that it could be incompatible with SAMD architecture.
> 
> The issue is that some interrupts are shared between pins.? If you go look at
> the pinout page for the M0 on Adafruit's site, the image which shows the layout
> and pin information included info on the interrupts:
> https://learn.adafruit.com/adafruit-feather-m0-basic-proto/pinouts? The
> following pins share external interrupts in the zero variant:
> 
>  * |EXTERNAL_INT_2|: A0, A5, 10
>  * |EXTERNAL_INT_4|: A3, 6
>  * |EXTERNAL_INT_5|: A4, 7
>  * |EXTERNAL_INT_6|: 8, SDA
>  * |EXTERNAL_INT_7|: 9, SCL
>  * |EXTERNAL_INT_9|: A2, 3
>  * |EXTERNAL_INT_10|: TX, MOSI
>  * |EXTERNAL_INT_11|: RX, SCK
> 
> 
> Check out section 20 "EIC - External Interrupt Controller" of the datasheet:
> https://cdn-learn.adafruit.com/assets/assets/000/030/130/original/atmel-42181-sam-d21_datasheet.pdf?1453847579
> for the low-level setup and using the external interrupts.
> 
> One poster complained "the code that Adafruit provides for their Feather M0 is
> clearly not properly setting the processor up for interrupts".
> 
> I hope some of this helps.
> 
> - sgh



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.


|\ |  (¯  \/ |¯\  |V| |\ ¯|¯ |¯) | \/ | | | |¯\ (¯   /¯  /\ |V|
|-||_ (_  /\ |_/ @| | |-| |  | \ | /\ |^| | |_/ (_ . \_  \/ | |







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.triembed.org/pipermail/triembed_triembed.org/attachments/20171109/b6ae542d/attachment.html>


More information about the TriEmbed mailing list