Helpful ReplyPIC32MZ oscillator settings

Author
sjpapa
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2017/08/08 06:37:38
  • Location: 0
  • Status: offline
2017/10/09 00:46:54 (permalink)
0

PIC32MZ oscillator settings

Dear forum,
Trying to make PIC32MZ20148EFG100 to work, but seems does not start. Not even Blink.c.
Tried to set clock settings according to excel sheet: MZ oscillator configuration:
with the following:
FNOSC = SPLL
FSOSCEN =OFF
POSCMOD = EC
OSCIOFNC = ON
FPLLICLK =PLL_POSC
FPLLDIV = DIV_3
FPLLODIV =DIV_2
FPLLRNG = RANGE_5_10_MHZ
// UPLLEN = ON => this creates conflict and was commented out!!!
UPLLFSEL = FREQ_24MHZ

any hints how to start the PIC32MZ? Did I miss anything? Why does UPLLEN create compiler error?
many thanks
#1
jcandle
Senior Member
  • Total Posts : 148
  • Reward points : 0
  • Joined: 2011/09/19 22:01:53
  • Location: 0
  • Status: offline
Re: PIC32MZ oscillator settings 2017/10/09 07:12:57 (permalink)
0
there should be a multiplier (x50 to get 200MHz).  I am at the wrong computer to post the actual config bits I use for this chip until Wednesday...  Other than the mult, the only difference is I am using HS crystal not EC external clock...
 
you could ude Harmony to configure a clock and see what settings it says work.
#2
sjpapa
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2017/08/08 06:37:38
  • Location: 0
  • Status: offline
Re: PIC32MZ oscillator settings 2017/10/09 07:33:22 (permalink)
0
Many thanks!
Yes multiplier was there...
#define SYS_FREQ (200000000L)
#define FOSC (200000000L) //80MHz
// Device Config Bits in DEVCFG1:
... as above
// Device Config Bits in DEVCFG2:
.. as above
#pragma config FPLLMULT = MUL_50
..
//#pragma config UPLLEN = OFF    => creates error.
#pragma config UPLLFSEL = FREQ_24MHZ
#define GetSystemClock() (FOSC)
 
I dont use harmony. I was too confused with its setup, and abandoned. Maybe need a better tutorial?
I use the chipkit Wifire board. It starts with Arduino compiler ok.
post edited by sjpapa - 2017/10/09 07:36:51
#3
bblessing
Super Member
  • Total Posts : 441
  • Reward points : 0
  • Joined: 2008/12/04 06:44:21
  • Location: Cincinnati, OH
  • Status: offline
Re: PIC32MZ oscillator settings 2017/10/09 09:17:08 (permalink) ☄ Helpfulby sjpapa 2017/10/09 09:18:35
3 (1)
As tough as Harmony seems at first, it will be WELL worth your time to learn it. Harmony now has a clock configurator that I have found to be indispensable when I want to know what is going on quickly. At the same time, you have a board support package available for your board. You should be able to simply select it with a new project and all of the problems with the clock should go away as this board has been characterized and tested.
#4
sjpapa
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2017/08/08 06:37:38
  • Location: 0
  • Status: offline
Re: PIC32MZ oscillator settings 2017/10/12 11:58:06 (permalink)
0
jcandle
there should be a multiplier (x50 to get 200MHz)= Yes accidentally omitted, correct now.
... until Wednesday...  
you could use Harmony to configure a clock and see what settings it says work.




Can you please send your MZ clock settings? 
Why do I get the UPLLEN error?
Will try with HS, although the chipkit Wifire board has the PIC32MZ201EFG100 with a 24MHz external clock chip.
Quarz (I assume 32kHz) is not installed.
Many thanks
 
#5
Jump to:
© 2017 APG vNext Commercial Version 4.5