ATMEGA 328 Timer/Counter2 frequency problem
-
I wonder if anyone else have encountered this problem, and can explain why is it happening.
I was trying to increase frequency of PWM, so the first thing I tried, was lowering the prescaler for Timer2. By default it is set to 1/64 of F_CPU. I am running this particular node at 8MHz.TCCR2B = _BV(CS21);Setting prescaler to 0 or 8 leads to it being unable to receive any NRF24 messages, though it sends okay.
TCCR2B = _BV(CS21) | _BV(CS20);Setting prescaler to 32 works normal, as does setting PWM mode to Fast PWM.
I've searched the Mysensors code and haven't found any mentions of use of Timer2 or interrupts connected to it.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login