Open Saatvik-Aggarwal opened 1 year ago
Please do not include the formatting code into the PR or I can not see where you changed. At this moment you changed every line of the code.
Also please only cherry pick the necessary commits.
I know there are format issue in this repo and I'll get them fixed these days. You can do your part afterward.
@DeqingSun I've undone the formatting changes. Let me know what you think. I had to add a "hacky" part for the delay() function, I'm not sure why the approach that all the other frequencies used does not work. Nevertheless, the code is working and I am now running my CH552G at 6Mhz, saving a few milliamps of current.
Thanks, this looks nice. But a clock change will require intensive testing with logic analyzer. I will test the timing then I will merge it.
I've added support for 6MHz clock. I've tested it for accuracy with my CH552G.
Here is a loop function you can use to test: