Pic32 Not Working with 18.432MHz Crystal

rmrps's picture

Offline

Joined: Dec 26, 2019

Replies: 0
Pic32 Not Working with 18.432MHz Crystal
March 3, 2021 - 1:31pm

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.

Sourav Gupta's picture

Offline

Joined: Feb 12, 2018

Replies: 628

Why you need such crystal as primary. Use it in secondary. It is not supported by the mcu and any PLL or Divider will support it.