MCC clock setup ?
Hi, i generated some code with MCC for PIC32MX170F256B.
I dont understand that with SYSKEY, and the rest,
i deleted all this code.
SYSKEY = 0x12345678;
SYSKEY = 0xAA996655;
SYSKEY = 0x556699AA;
SYSKEY = 0x00000000;
// CF no clock failure; COSC FRCPLL; PLLODIV DIV_2; PBDIVRDY disabled; SLOCK out of lock; FRCDIV FRC/2; SLPEN Idle on WAIT instruction; NOSC FRCPLL; PLLMULT MUL_24; SOSCEN disabled; PBDIV DIV_1; CLKLOCK unlocked; OSWEN Switch is Complete; SOSCRDY disabled;
OSCCON = 0x9071100;
// TUN Center Frequency;
OSCTUN = 0x0;
// DIVSWEN disabled; RSLP disabled; ACTIVE Active; ROSEL SYSCLK; OE Not Driven out on REFCLKO pin; SIDL disabled; RODIV 0; ON disabled;
REFOCON = 0x100;
// ROTRIM 0;
REFOTRIM = 0x0;
If i delete it, it does the same since the configuration is already in those bytes also.
Why does MCC generate this double ?, the configuration bytes also works.
If i delete this code do i miss something ?, maybe only finetuning ?
post edited by Jan Audio - 2018/10/31 07:32:07