Pic32 Not Working with 18.432MHz Crstal

Status
Not open for further replies.

rmrps

Member level 2
Joined
Oct 4, 2011
Messages
42
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
1,635
I am using 18.432 MHz Crystal and Pic32MX460F512L Microcontroller with 22pf capacitor, i am having the following configuration settings but the controller not working it's get hanging

#define SYSCLK 147456000L
#define PBCLK (SYSCLK/2)
#define Fsck 50000
#define BRG_VAL ((PBCLK/2/Fsck)-2)

#pragma config FPLLMUL = MUL_16, FPLLIDIV = DIV_2, FPLLODIV = DIV_1, FWDTEN = OFF
#pragma config POSCMOD = HS, FNOSC = PRIPLL, FPBDIV = DIV_8,FSOSCEN = OFF
#pragma config WDTPS = PS1048576

the program get stuck in
SYSTEMConfig(SYSCLK, SYS_CFG_WAIT_STATES | SYS_CFG_PCACHE);

after the above line the controller get hanged

I guess my configuration setting is the issue please guide me to resolve this issue.
 

Hi,

The datasheet say 80MHz maximum.
So 145MHz is beyond specification.

Or did I miss something?

Klaus
 

Check out Section 8 of the data sheet. Figure 8-1 shows that the input to the PLL must be between 4MHz and 5MHz.
Also check out the FRM section for the oscillator (find that on the device's web page).
Given the possible values of FPLLIDIV and an 18.432MHz crystal, that means FPLLIDIV has to be set to 'divide by 4'. You have it as divide by 2 so I'm guessing the PLL is never locking.
Susan
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…