Interrupts() and noInterrupts() is undefined

I’m trying to compile for the XIAO but I’m getting errors on the interrupts calls:

#define interrupts() __enable_irq()
Expands to:
identifier “__enable_irq” is undefined

#define noInterrupts() __disable_irq()
Expands to:
identifier “__disable_irq” is undefined

142: #define interrupts() __enable_irq()

554: #define __enable_irq __enable_interrupt

No definition found for ‘__enable_interrupt’

Any ideas?

1 Like

Does the XIOA even support Hardware Timer Interrupts?
TCCR1A = 0;
TCCR1A = _BV(WGM10);
TCCR1B = 0;
TCCR1B = _BV(CS10) | _BV(WGM12);
tells me
error: ‘TCCR1A’ was not declared in this scope

1 Like @Ascii Does this code help you?

1 Like

@Ascii were you ever able to get uClock working on the XIAO ? There have been several updates to uClock since your post here. I’d like to implement uClock on a XIAO for a midi project I am working on too. I have also reached out to the developer of uClock on GitHub regarding XIAO support. They are willing to port but need more information: uClock support for Seeeduino XIAO? · Issue #6 · midilab/uClock · GitHub

the framework-arduino-samd-seeed package delivers a TimerTCC0.h you need to include. Otherwise there was some rewriting necessary I can’t remember right away. But at the end it was working.

There was something with adding a new initSAMDTimer I remember, where TimerTcc0 was initialized and attached to an ISR.

However, there is a new version of uClock available which I haven’t been able to verify.

1 Like

Ok, thanks so much for the detail and glad you got it working. The developer of uClock is willing to write a XIAO specific port of the library and I am sure would appreciate any input. Thanks again.