[Fixed] Timer on Due not working for me - any ideas?

Hi,

I posted this in the Timer thread, but that seems to have died. Sorry for posting again in a new thread...

I've implemented Sebastian Vik & cmaglie's timer code (Timer Interrupts on Due - #20 by cmaglie - Arduino Due - Arduino Forum) . I've got it working as is, with the LED. And I also tried a Serial.println and that works fine too.

However after transplanting the code to something more meaty (a RGB Pixel light string) - the TC3_Handler only executes once.

The LEDs driver is using the hardware SPI channel - could it be anything to do with that? To rule out a clash of interrupts with the LED driver, I tried TC4/5 then TC0, and also only 1Hz - but I still get nothing.

Any ideas? I'll post a video of the lights, if I get it working. (The code works otherwise - if I base the timer on time, it works fine)

I'll post the code, but you'd need the lights to see it:

(note the previous version of the code on GitHub works without the timer)

I know that no one else was currently interested in this topic, but I hate it when I Google a problem, and find an orphan question with no replies. :grin:

I sorted this issue by painstakingly testing every line in the code, to see what broke the interrupt calls.

I found that there was a 'delay(1)' in the LED driver code. I commented this out, and it worked.

So no delays in interrupt code, folks!