chipKIT™ Pro MX7 Board Reference Manual
Appendix B: Example of Configuration Values
The following example illustrates setting the configuration values in the PIC32 microcontroller on the chipKIT Pro
MX7. The microcontroller configuration should be done in a single source file in the project, and is typically done in
the 'main' project source file. This example sets all configuration values to valid values for the chipKIT Pro MX7
board. It sets the system clock for processor operation at 80 MHz, and the peripheral bus at 10 MHz.
/* ------------------------------------------------------------ */
/*
PIC32 Configuration Settings
/* ------------------------------------------------------------ */
/* Oscillator Settings
*/
#pragma config FNOSC
#pragma config POSCMOD
#pragma config FPLLIDIV = DIV_2
#pragma config FPLLMUL
#pragma config FPLLODIV = DIV_1
#pragma config FPBDIV
#pragma config FSOSCEN
/* Clock control settings
*/
#pragma config IESO
#pragma config FCKSM
(CMx)
#pragma config OSCIOFNC = OFF
/* USB Settings
*/
#pragma config UPLLEN
#pragma config UPLLIDIV = DIV_2
#pragma config FVBUSONIO = OFF
#pragma config FUSBIDIO = OFF
/* Other Peripheral Device settings
*/
#pragma config FWDTEN
#pragma config WDTPS
#pragma config FSRSSEL
#pragma config FCANIO
#pragma config FETHIO
#pragma config FMIIEN
/* Code Protection settings
*/
#pragma config CP
#pragma config BWP
#pragma config PWP
/* Debug settings
*/
#pragma config ICESEL
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
= PRIPLL
// Oscillator selection
= EC
// Primary oscillator mode
// PLL input divider
= MUL_20
// PLL multiplier
// PLL output divider
= DIV_8
// Peripheral bus clock divider
= OFF
// Secondary oscillator enable
= OFF
// Internal/external clock switchover
= CSDCMD
// Clock switching (CSx)/Clock monitor
// Clock output on OSCO pin enable
= ON
// USB PLL enable
// USB PLL input divider
// VBUS pin control
// USBID pin control
= OFF
// Watchdog timer enable
= PS1024
// Watchdog timer post-scaler
= PRIORITY_7 // SRS interrupt priority
= OFF
// Standard/alternate CAN pin select
= ON
// Standard/alternate ETH pin select
= OFF
// MII/RMII select (OFF=RMII)
= OFF
// Code protection
= OFF
// Boot flash write protect
= OFF
// Program flash write protect
= ICS_PGx1
// ICE pin selection
*/
Page 26 of 35
Need help?
Do you have a question about the chipKIT Pro MX7 and is the answer not in the manual?
Questions and answers