When using firmware 0.5.3-rc2 and above on a core the attachInterupt does not work.
When using firmware 0.5.2 it does work.
I tested with a simple code:
void setup() {
pinMode(D3, INPUT);
pinMode(D7, OUTPUT);
attachInterrupt(D3, buttonPushed, FALLING);
}
void buttonPushed(){
digitalWrite(D7,!digitalRead(D7));
}
void loop() {
}
Does this have to do with the implementation of “added HAL_IsISR() which is used to skip calling the background loop from delay(). fixes #673 ” ?
attachInterrupt()
does work, the only known issue on the Core is that external interrupts are disabled by default.
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...
PR SUBMITTED
bug
confirmed
And the current workaround (provided in that issue report) is to call interrupts();
in setup()
1 Like
I was looking for this issue and thought that someone should have encountered this, but could not find it.
Thank you very much. I will add this to my code.