Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core 0.5.3]: Interrupts are disabled by default #1136

Closed
ScruffR opened this issue Oct 8, 2016 · 4 comments · Fixed by #1255

Comments

@ScruffR
Copy link
Contributor

commented Oct 8, 2016

As discussed here, 0.5.3 seems to have introduced an unexpected behaviour with interrupts on Cores
https://community.particle.io/t/interrupts-disabled-on-core-fw-0-5-3-and-later/26393

Only after adding interrupts(); they start firing.

void isr()
{
  digitalWrite(D7, !digitalRead(D7));
}

void setup() {
  pinMode(D7, OUTPUT);
  pinMode(D3, INPUT_PULLDOWN);
  attachInterrupt(D3, isr, CHANGE);
  //attachInterrupt(D3, isr, RISING);
  //attachInterrupt(D3, isr, FALLING);
  //interrupts();
}

void loop() { }

Completeness:

  • Minimum test case added
  • Device, system and user firmware versions stated
@gmazzo

This comment has been minimized.

Copy link

commented Nov 1, 2016

I've spent three days thinking I was doing something wrong. In deed, add interrupts(); did the trick.

The docs says it's enabled by default, so it has to be an issue:
https://docs.particle.io/reference/firmware/core/#interrupts

@ScruffR

This comment has been minimized.

Copy link
Contributor Author

commented Nov 1, 2016

Thanks for confirming 👍

@ScruffR

This comment has been minimized.

Copy link
Contributor Author

commented Jan 5, 2017

It's a while now and still no Particle confirmation?
A new case where user got bitten by this still unaddressed issue
https://community.particle.io/t/unable-to-get-results-from-dht22/28361

But there would be a simple cure (I guess)

@technobly

This comment has been minimized.

Copy link
Member

commented Feb 6, 2017

Thanks for the great test case @ScruffR !

I can confirm this is working as expected on 0.5.2, and broken on 0.5.3 (requiring interrupts(); for the ISR to fire).

@technobly technobly added this to the 0.7.0 milestone Feb 6, 2017

@technobly technobly changed the title [Core 0.5.3ff]: Interrupts are disabled by default [Core 0.5.3]: Interrupts are disabled by default Feb 6, 2017

@sergeuz sergeuz referenced this issue Feb 19, 2017
5 of 7 tasks complete

@technobly technobly modified the milestones: 0.6.2, 0.7.0 Mar 27, 2017

@technobly technobly modified the milestones: 0.7.0, 0.6.2 Apr 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.