SW006015 Microchip Technology, SW006015 Datasheet - Page 58

C COMPILER MPLAB C32

SW006015

Manufacturer Part Number
SW006015
Description
C COMPILER MPLAB C32
Manufacturer
Microchip Technology
Type
Compilerr
Series
PIC32r
Datasheets

Specifications of SW006015

Supported Families
PIC32MX5, MX6, And MX7
Core Architecture
PIC
Kit Contents
Software And Docs
Mcu Supported Families
PIC32 MCUs
Tool Function
Compiler
Supported Devices
PIC32 MCUs
Tool Type
Compiler
Processor Series
PIC32
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
PIC32
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
4.8
DS51686A-page 54
CONFIGURATION BIT ACCESS
®
_CP0_
_CP0_
For example the vector spacing field of the IntCtl register has the following defines:
4.7.4
When the CP0 register definitions header file is included from a C file, CP0 access
macros are defined. Each CP0 register may have up to six different access macros
defined:
4.8.1
The #pragma config directive specifies the processor-specific configuration settings
(i.e., configuration bits) to be used by the application. Refer to the “PIC32MX
Configuration Settings” on-line help for more information.
Configuration settings may be specified with multiple #pragma config directives.
MPLAB C32 C compiler verifies that the configuration settings specified are valid for
the processor for which it is compiling. If a given setting in the configuration word has
not been specified in any #pragma config directive, the bits associated with that
setting default to the unprogrammed value.
For each configuration word for which a setting is specified with the #pragma config
directive, the compiler generates a read-only data section named .config_address,
where address is the hexadecimal representation of the address of the configuration
word. For example, if a configuration setting was specified for the configuration word
located at address 0xBFC02FFC, a read-only data section named
.config_BFC02FFC would be created.
_CP0_GET_
_CP0_SET_
_CP0_XCH_
_CP0_BIS_
_CP0_BIC_
_CP0_BCS_
#define _CP0_INTCTL_VS_POSITION 0x00000005
#define _CP0_INTCTL_VS_MASK
#define _CP0_INTCTL_VS_LENGTH
REGISTER
REGISTER
CP0 Access Macros
#pragma config
REGISTER
REGISTER
REGISTER
REGISTER
REGISTER
REGISTER
_
_
NAME
NAME
_
_
_
_
_
_
NAME
NAME
NAME
NAME
NAME
NAME
_
_
FIELD
FIELD
()
(val)
(val)
(set)
(clr)
(clr, set)
_
_
NAME
NAME
_MASK – the bits that are part of this field are set
_LENGTH – the number of bits that this field occupies
0x000003E0
0x00000005
Returns the value for register,
Sets the register,
returns void. Only defined for registers that
contain a writable field.
Sets the register,
returns the previous register value. Only
defined for registers that contain a writable
field.
Sets the register,
(reg |= set), and returns the previous register
value. Only defined for registers that contain
writable bit fields.
Sets the register,
(reg &= ~clr), and returns the previous
register value. Only defined for registers that
contain writable bit fields.
Sets the register,
(reg = (reg & ~clr) | set), and returns the
previous register value. Only defined for
registers that contain writable bit fields.
© 2007 Microchip Technology Inc.
REGISTER
REGISTER
REGISTER
REGISTER
REGISTER
_
_
_
_
_
NAME
NAME
NAME
NAME
NAME
REGISTER
, to val, and
, to val, and
, to
, to
, to
_
NAME
.

Related parts for SW006015