Page 1 of 1

Setting PIC32MX and PIC32MZ Clock Options

Posted: Thu Feb 20, 2020 6:20 pm
by Brendan
Re-posting my comments made elsewhere...

Hi Guys.

As MX and MZ clock settings feature strongly in this thread, I thought I'd share something that I came across and enabled me to quickly confirm appropriate clock settings and transfer them to configuration option in Flowcode. No reliance on Harmony or other info, and it just worked!

I therefore recommend downloading Microchip's MX and MZ Oscillator Configurator Excel workbook (there are separate worksheets for each PIC type) from here:
https://microchipdeveloper.com/32bit:mz-osc

The linked page also provides other relevant information on clock settings for improved understanding.

Simply adjust your settings in the applicable worksheet (which incidentally red flags any settings that are out of bounds), transfer them to Flowcode configuration option registers by the same name as those featured in the spreadsheet, and declare SPLL as your clock speed under Flowcode "General Options".

Enjoy!

All the best,
Brendan

Re: Setting PIC32MX and PIC32MZ Clock Options

Posted: Thu Feb 20, 2020 7:27 pm
by stefan.erni
Hello Brendan

Yes that's very nice. Thank's a lot.

So you can quickly and easily change clock properties.
There is a way to do this during the program. Somehow with the unlook sequences and keyword (syskey). I only suspect that. But putting the PIC in a power-saving mode would be a good thing. As an example, you would have to set FPLLMULT (system PLL multiplier) from 50 to 25 and in the general option clockspeed from 200,000,000 to 100,000,000 and this already saves 30% power. With your Excel you have a good overview of which clock speeds you can reduce and which ones better not.

regards

Stefan
clock_mod.PNG
(9.17 KiB) Downloaded 1517 times
clock_mod2.PNG
(186.5 KiB) Downloaded 1517 times