ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Enabling timer overflow interrupt breaks rosserial

asked 2014-07-21 20:39:37 -0600

Brian Kohan gravatar image

updated 2014-07-21 21:35:58 -0600


I'm trying to get rosserial working to communicate with a Colorduino. The colorduino has an ATmega 328 chip and the driver for it uses timer2 to refresh the matrix at 80hz.


Enabling the overflow interrupt on timer2 using: TIMSK2 |= ((1<<TOIE2) | (0<<OCIE2B)); breaks serial comms. ROS can't establish a connection with the board. Does anyone know why this would be?


This issue appears to be due to how the Colorduino library is managing pins. The root cause of the issue above was that the ISR registered for the overflow interrupt was turning off ALL PORTD (including RX/TX) instead of only the two it needed to. I've fixed that, but am still having serial comms issues I believe relating to how other pins are managed. I will report back when I know more.

I don't have the karma needed to post links, but if you google Colorduino Library it will be the first hit.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-07-11 15:42:22 -0600

MrMartins gravatar image

I'm having a similar issue with my project. I already tried using timer1 and timer3 but both of them break the serial. How did you fix your project?

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-07-21 20:39:37 -0600

Seen: 888 times

Last updated: Jul 21 '14