pic32mx320f064h Microchip Technology Inc., pic32mx320f064h Datasheet - Page 195

no-image

pic32mx320f064h

Manufacturer Part Number
pic32mx320f064h
Description
64/100-pin General Purpose, 32-bit Flash Microcontrollers
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
pic32mx320f064h-40I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-40I/PT
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
pic32mx320f064h-40V/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-80I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064h-80V/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
pic32mx320f064hT-40I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
9.4
When the MVEC (INTCON<12>) bit is ‘1’, the interrupt
controller operates in Multi-Vector mode. In this mode,
the CPU vectors to the unique address for each vector
number. Each vector is located at a specific offset, with
respect to a base address specified by the EBase reg-
ister in the CPU. The individual vector address offset is
determined by the vector space that is specified by the
VS bits in the IntCtl register. (The IntCtl register is
located in the CPU; refer to Section 2.0 of this manual
for more information.)
EXAMPLE 9-2:
© 2007 Microchip Technology Inc.
/*
*/
Set the CP0 registers for multi-vector interrupt
Place EBASE at 0xBD000000 and Vector Spacing to 32 bytes
This code example uses MPLAB C32 intrinsic functions to access CP0 registers.
Check your compiler documentation to find equivalent functions or use inline assembly
unsigned int temp;
asm(“di”);
temp = _CP0_GET_STATUS();
temp |= 0x00400000;
_CP0_SET_STATUS(temp);
_CP0_SET_EBASE(0xBD000000);
_CP0_SET_INTCTL(0x00000020);
temp = _CP0_GET_CAUSE();
temp |= 0x00800000;
_CP0_SET_CAUSE(temp);
temp = _CP0_GET_STATUS();
temp &= 0xFFBFFFFD;
_CP0_SET_STATUS(temp);
INTCONSET = 0x1000;
asm(“ie”);
Multi-Vector Mode
MULTI-VECTOR MODE INITIALIZATION
Advance Information
// Disable all interrupts
// Get Status
// Set BEV bit
// Update Status
// Set an EBase value of 0xBD000000
// Set the Vector Spacing to non-zero value
// Get Cause
// Set IV
// Update Cause
// Get Status
// Clear BEV and EXL
// Update Status
// Set MVEC bit
// Enable all interrupts
To configure the CPU in Multi-Vector mode, the follow-
ing CPU registers (IntCtl, Cause, and Status) and the
INTCON register must be configured as follows:
• EBase ≠ 00000
• VS (IntCtl<9:5>) ≠ 00000
• IV (Cause<23>) = 1
• EXL (Status<1>) = 0
• BEV (Status<22>) = 0
• MVEC (INTCON<12>) = 1
• IE (Status<0>) = 1
PIC32MX FAMILY
DS61143A-page 193

Related parts for pic32mx320f064h