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
2 out of 2
Suggested Topics
-
Day 1 - Status report
Announcements • 23 Mar 2014, 22:45 • hek 24 Mar 2014, 20:12 -
NODs stop responding, but ping works.
Troubleshooting • 22 days ago • Marcin 22 days ago -
Compiling Sensor code using BME280 and ESP8266
Troubleshooting • 26 Feb 2025, 00:32 • dpcons 26 Feb 2025, 06:22 -
Getting system time from the controller
Troubleshooting • 27 Feb 2025, 01:39 • dpcons 28 days ago -
Echo request is not set
Troubleshooting • 12 Aug 2024, 15:36 • kamilb85 3 Sept 2024, 08:58 -
Can not compile MySensors on esp8266
Troubleshooting • 24 Aug 2024, 15:35 • TheoL 29 Aug 2024, 20:47