-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig_bits.h
56 lines (46 loc) · 2.53 KB
/
config_bits.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* File: configbits.h
* Author: Sammy Guergachi <sguergachi at gmail.com>
*
* Created on January 31, 2014, 5:22 PM
*/
#ifndef CONFIGBITS_H
#define CONFIGBITS_H
#ifdef __cplusplus
extern "C" {
#endif
// PIC32MX795F512L Config Bits
// DEVCFG3
//#pragma config USERID =
#pragma config FSRSSEL = PRIORITY_7 // SRS Select (SRS Priority 7)
#pragma config FMIIEN = OFF // Ethernet RMII/MII Enable (MII disabled)
#pragma config FETHIO = OFF // Ethernet I/O Pin Select (Default Ethernet I/O)
#pragma config FCANIO = OFF // CAN I/O Pin Select (Default CAN I/O)
#pragma config FUSBIDIO = ON // USB USID Selection (Controlled by the USB Module)
#pragma config FVBUSONIO = OFF // USB VBUS ON Selection (Controlled by USB Module)
// DEVCFG2
#pragma config FPLLIDIV = DIV_4 // PLL Input Divider (4x Divider)
#pragma config FPLLMUL = MUL_20 // PLL Multiplier (20x Multiplier)
#pragma config UPLLIDIV = DIV_4 // USB PLL Input Divider (4x Divider)
#pragma config UPLLEN = ON // USB PLL Enable (Enabled)
#pragma config FPLLODIV = DIV_1 // System PLL Output Clock Divider (PLL Divide by 1)
// DEVCFG1
#pragma config FNOSC = PRIPLL // Oscillator Selection Bits (Primary Osc w/PLL (XT+,HS+,EC+PLL))
#pragma config FSOSCEN = ON // Secondary Oscillator Enable (enabled)
#pragma config IESO = OFF // Internal/External Switch Over (disabled)
#pragma config POSCMOD = XT // Primary Oscillator Configuration (XT_HS osc mode)
#pragma config OSCIOFNC = OFF // CLKO Output Signal Active on the OSCO Pin (disabled)
#pragma config FPBDIV = DIV_1 // Peripheral Clock Divisor (Pb_Clk is Sys_Clk/1)
#pragma config FCKSM = CSDCMD // Clock Switching and Monitor Selection (Clock Switch Disable, FSCM Disabled)
#pragma config WDTPS = PS1048576 // Watchdog Timer Postscaler (1:1048576)
#pragma config FWDTEN = OFF // Watchdog Timer Enable (WDT disabled (SWDTEN Bit Controls))
// DEVCFG0
#pragma config DEBUG = ON // Background Debugger Enable (Debugger is enabled)
#pragma config ICESEL = ICS_PGx2 // ICE/ICD Comm Channel Select (ICE EMUC2/EMUD2 pins shared with PGC2/PGD2)
#pragma config PWP = OFF // Program Flash Write Protect (disabled)
#pragma config BWP = OFF // Boot Flash Write Protect bit (Protection disabled)
#pragma config CP = OFF // Code Protect (Protection disabled)
#ifdef __cplusplus
}
#endif
#endif /* CONFIGBITS_H */