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.



  • Hi Monte!

    May you please post your sketch?

    Thank you very much, edi


Log in to reply
 

Suggested Topics

  • 3
  • 1
  • 2
  • 6
  • 5
  • 1

12
Online

11.4k
Users

11.1k
Topics

112.7k
Posts