Good morning,
I apologize if I was unable to participate in the discussion earlier but I was busy.
So it seems to be a problem from the “Arduino AVR” platform, which has some bugs?
Perhaps waiting for a new update the problem could be solved.
So as suggested by @maxgerhardt it was enough to switch to the development version as reported in the repository?
In addition, as mentioned by @normandunbar, the delay function also produces an error on the set time.
I didn’t pay too much attention to it (as my serial monitor doesn’t show me the timestamps) but I definitely saw that the messages didn’t arrive at a constant rate.
In this case the value of 245 MHz and 498 MHz refers to the PWM frequency, right?
Because with a period of 4s the resulting frequency is far from that value.
BTW, Nice oscilloscope! I took a look and it looks really nice. My oscilloscope instead is the DSO150, is not very accurate but it does its job.
Sounds cool!
Just to be precise I would like to check if this modification also corrects the PWM frequency (bringing it to 36kHz).
After all, I can also define too that this could be the definitive solution for now (platform updates aside).
I apologize if it was not new, but I did not really know where to look to be able to solve this problem
And so now I just have to apply these changes and do some more experiments.
In the meantime, thank you for the help.
Cheers