Interrupt service routine for SAMD21G18

I’m using a SAMD21G18 microcontroller with Arduino as the development platform and I want to implement a UART interrupt service routine. Is there a way to achieve this?

Hi there,
Something like this would do.

void setup(){
 Serial.begin(9600);  
  pinMode(7, INPUT);      // Make pin 7 RXD an input
   
    // attach our interrupt pin to it's ISR
    attachInterrupt(0, recISR, CHANGE);
    // we need to call this to enable interrupts
    interrupts();
}

// The interrupt hardware calls this when we hit our left bumper
void recISR(){

  //  rec = 1;
     Serial.println("interrupt!"); 
 
}

Give something like that a try.
HTH
GL :slight_smile: PJ :v: