0

Feather M0 External Interrupts not functioning
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Feather M0 External Interrupts not functioning

by darkhawk on Thu Apr 14, 2016 7:38 am

From what I've been experiencing, none of the external interrupts for pins are working on the M0.

I can verify that A0 through A5, D5, and D6 do not function when trying to use them.

While I haven't done thorough and exhaustive study to figure out exactly what is going on, I can say that they don't work properly. j

I know that interrupts are being enabled, but it's certain they are not going to the proper pins. For instance, when I was trying to use A1 through A5, when I would press A5 the intterupt for A1 would run. This tells me that the interrupt was enabled, but the pin associated with the interrupt for A1 was actually the pin for A5. If that makes sense to anyone.

However when trying to use my own software (these were all being used for buttons for an interface) to handle this, it functions as expected.

I'm not sure how to go about fixing the problem, but it definitely exists and doesn't function.

In my searching of the forums, I only found 1 other thread where another user had similar results, which leads me to conclude that it does exist, but we are the only 2 experiencing the problems or are the only ones that have tried using this functionality so far.

Any insight into fixing it so the external interrupts function would be greatly appreciated.

darkhawk
 
Posts: 14
Joined: Mon Mar 10, 2014 11:46 pm

Re: Feather M0 External Interrupts not functioning

by ERICBARIL72 on Thu Apr 14, 2016 9:13 am

I got this Interupt sketch to work ... my first tries were not successfull
Counts the number of "Clicks" per seconds.

Pin 13 - Flashing LED
Pin 11 - input interupt

Code: Select all | TOGGLE FULL SIZE
const int LAST_PIN = 11;
const int out_PIN = 13;
volatile int tick;
#define Serial Serial1
bool State=HIGH;

void ding() {
  tick++;
  State!=State;
  digitalWrite(13,State);
 
}

void setup() {
    pinMode(LAST_PIN, INPUT_PULLUP);
    attachInterrupt(LAST_PIN, ding, FALLING);
  pinMode(out_PIN, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  Serial.print(" digital read:  ");
  delay(1000);
 
   
      Serial.print(digitalRead(11));
  Serial.print("  ");
  Serial.println(tick);
  tick = 0;
}

ERICBARIL72
 
Posts: 58
Joined: Fri Apr 01, 2016 9:16 am

Re: Feather M0 External Interrupts not functioning

by darkhawk on Thu Apr 14, 2016 9:28 am

Could you retry it with different pins? Such as D5 or D6, or maybe even A1 through A5?

None of those have worked properly as interrupts.

darkhawk
 
Posts: 14
Joined: Mon Mar 10, 2014 11:46 pm

Re: Feather M0 External Interrupts not functioning

by franklin97355 on Thu Apr 14, 2016 12:46 pm

From what I've been experiencing, none of the external interrupts for pins are working on the M0.
Where are you getting your information on the interrupts and pins available?

franklin97355
 
Posts: 19238
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Feather M0 External Interrupts not functioning

by darkhawk on Thu Apr 14, 2016 1:17 pm

Every pin on the M0 can have an interrupt enabled. Although some interrupts are shared between pins.
If you go look at the pinout page, the picture which shows the layout and pin information included info on the interrupts.
https://learn.adafruit.com/adafruit-fea ... to/pinouts

I'd test it all myself, but my M0 is already installed in my project and working with software to handle button presses instead of interrupts.

darkhawk
 
Posts: 14
Joined: Mon Mar 10, 2014 11:46 pm

Re: Feather M0 External Interrupts not functioning

by franklin97355 on Fri Apr 15, 2016 12:09 am


franklin97355
 
Posts: 19238
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Feather M0 External Interrupts not functioning

by darkhawk on Fri Apr 15, 2016 12:27 am

I'm more than aware of the capabilities of the chip itself. That was evident in my prior post so I'm not quite sure why you are linking me to a datasheet.....

My problem is that very obviously a number of the interrupts are not working properly. That is evidenced by my first post where I stated that an interrupt generated on A5 would run the interrupt routine for A1. This clearly means that however the underlying code that is generated (ie the code that adafruit provides for their Feather M0) is clearly not properly setting the processor up for interrupts.

If I had the knowledge on how to dig that deeply into it (or the time for that matter) to fix it, I certainly would. Unfortunately, I just don't. And expecting your users to do it for you is poor business. Oh how I love being a beta tester of a final product that I pay for.

If you search these forums, there's been 1 other user that had a similar issue in the past 2 weeks.

darkhawk
 
Posts: 14
Joined: Mon Mar 10, 2014 11:46 pm

Re: Feather M0 External Interrupts not functioning

by adafruit_support_mike on Fri Apr 15, 2016 12:48 am

darkhawk wrote:Oh how I love being a beta tester of a final product that I pay for.

You paid for the hardware.

The Arduino team spent money developing the IDE. Adafruit spent money paying developers to write the support libraries. Both organizations spend money paying people to expand and maintain the code.

You got them for free.

It's called Open Source. The social contract of Open Source is that people who receive the benefit of code they didn't pay for contribute value back to the overall project with feedback, bug reports, and code they've developed on their own. If you don't like that, please take your business to a company that will charge you an annual license fee for access to their development tools. Then you'll be in a legitimate position to complain about the value of what you've paid for.

adafruit_support_mike
 
Posts: 53606
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.