Exemple #1
0
void SystemSetSystemClock(u32 cpuCoreFrequency)
{
	SystemClocksSettings s;
	SystemClocksReadSettings(&s);
	SystemClocksCalcCpuClockSettings(&s, cpuCoreFrequency);
	SystemClocksWriteSettings(&s);
}
Exemple #2
0
void SystemSetPeripheralClock(u32 peripheralFrequency)
{
	SystemClocksSettings s;
	SystemClocksReadSettings(&s);
	SystemClocksCalcPeripheralClockSettings(&s, peripheralFrequency);
	SystemClocksWriteSettings(&s);
}
Exemple #3
0
void SystemConfig(u32 cpuCoreFrequency)
{
	SystemClocksSettings s;
	SystemClocksReadSettings(&s);
	SystemClocksCalcCpuClockSettings(&s, cpuCoreFrequency);
	SystemClocksCalcPeripheralClockSettings(&s, cpuCoreFrequency / 2);
	SystemClocksWriteSettings(&s);

	DDPCONbits.JTAGEN=0;		// PORTA is used as digital instead of JTAG
}
void SystemConfig(u32 cpuCoreFrequency)
{
    SystemClocksSettings s;
    SystemClocksReadSettings(&s);
    SystemClocksCalcCpuClockSettings(&s, cpuCoreFrequency);
    SystemClocksCalcPeripheralClockSettings(&s, cpuCoreFrequency / 2);
    SystemClocksWriteSettings(&s);

    //RB2014 : already defined in io.c / IOsetDigital()
    //DDPCONbits.JTAGEN=0;  // PORTA is used as digital instead of JTAG
    //CFGCONbits.JTAGEN=0;  // Disable the JTAG port
}