All machine external interrupts (global interrupts) are mapped to exception code of 11. Thus,
when interrupt vectoring is enabled, the
pc
is set to address
mtvec.BASE
+ 0x2C for any global
interrupt.
Individual interrupts are enabled by setting the appropriate bit in the
mie
register. The
mie
regis-
ter is described in Table 19.
Table 19:
mie
Register
Machine Interrupt Enable Register
CSR
mie
Bits
Field Name
Attr.
Description
[2:0]
Reserved
WPRI
3
MSIE
RW
Machine Software Interrupt Enable
[6:4]
Reserved
WPRI
7
MTIE
RW
Machine Timer Interrupt Enable
[10:8]
Reserved
WPRI
11
MEIE
RW
Machine External Interrupt Enable
[31:12]
Reserved
WPRI
The machine interrupt pending (
mip
) register indicates which interrupts are currently pending.
The
mip
register is described in Table 20.
Table 20:
mip
Register
Machine Interrupt Pending Register
CSR
mip
Bits
Field Name
Attr.
Description
[2:0]
Reserved
WIRI
3
MSIP
RO
Machine Software Interrupt Pending
[6:4]
Reserved
WIRI
7
MTIP
RO
Machine Timer Interrupt Pending
Chapter 8 Interrupts
FE310-G003 Manual
© SiFive, Inc.
Page 40
Содержание FE310-G003
Страница 1: ...SiFive FE310 G003 Manual v1p1 SiFive Inc ...