Robotics StackExchange | Archived questions

Enabling timer overflow interrupt breaks rosserial

Background

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.

Problem

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?

Update

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.

Asked by Brian Kohan on 2014-07-21 20:39:37 UTC

Comments

Answers

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?

Asked by MrMartins on 2019-07-11 15:42:22 UTC

Comments