Pages: [1]   Go Down
Author Topic: [Fixed] Timer on Due not working for me - any ideas?  (Read 752 times)
0 Members and 1 Guest are viewing this topic.
UK
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 (http://arduino.cc/forum/index.php/topic,130423.msg1013688.html#msg1013688) . 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:

https://github.com/MarkEMarkEMark/WS2801MEO

(note the previous version of the code on GitHub works without the timer)
« Last Edit: February 17, 2013, 12:14:44 pm by MarkEMarkEMark » Logged

UK
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley-mr-green

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!
Logged

Pages: [1]   Go Up
Jump to: