Electron interrupt C3 & RX not working

I am trying to use C3 and RX both as interrupt pins. They are not on the same interrupt group. Sadly this is not working when I trigger C3. Here is the code to reproduce:

SYSTEM_MODE(MANUAL);
SYSTEM_THREAD(ENABLED);

void isrHandler() {
	Serial.println("Key pressed");
}

void setup() {
	Serial.begin();

  	pinMode(C3, INPUT_PULLUP);
  	pinMode(RX, INPUT_PULLUP);
	attachInterrupt(C3, isrHandler, FALLING);
	attachInterrupt(RX, isrHandler, FALLING);
}

void loop() {
  
}

Any ideas whats going on?

@lympik, it is not a good idea to put Serial.print() in an ISR. Instead, change the state of the D7 LED to indicate an interrupt have been triggered. Or, set a flag in each ISR and test/reset the flags in ‘loop()’ where you can use Serial.print().

1 Like

Thanks that is only for demo purpose. Problem still exists.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.