Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
162
Добавлен:
01.03.2016
Размер:
3.56 Mб
Скачать

RM0016

Interrupt controller (ITC)

 

 

6.9ITC and EXTI registers

6.9.1CPU condition code register interrupt bits (CCR)

Address: refer to the general hardware register map table in the datasheet.

Reset value: 0x28

7

6

 

5

4

 

3

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

V

 

 

I1

H

 

I0

N

Z

 

C

 

 

 

 

 

 

 

 

 

 

 

 

r

 

r

 

rw

r

 

rw

r

r

 

r

 

 

 

 

 

 

 

 

 

 

 

 

Bits 5, 3(1) I[1:0]: Software interrupt priority bits(2)

 

 

 

 

 

 

 

These two bits indicate the software priority of the current interrupt request. When an

 

 

interrupt request occurs, the software priority of the corresponding vector is loaded

 

 

automatically from the software priority registers (ITC_SPRx).

 

 

 

 

 

The I[1:0] bits can be also set/cleared by software using the RIM, SIM, HALT, WFI, IRET or

 

 

PUSH/POP instructions (see Figure 16: Nested interrupt management).

 

 

 

 

I1

I0

 

 

Priority

 

 

Level

 

1

0

Level 0 (main)

 

 

 

Low

 

0

1

Level 1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

Level 2

 

 

 

 

 

 

 

 

 

High

 

 

 

 

 

 

 

 

 

 

11 Level 3 (= software priority disabled*)

1.Refer to the central processing section for details on the other CCR bits.

2.TLI, TRAP and RESET events can interrupt a level-3 program.

Doc ID 14587 Rev 9

67/454

Interrupt controller (ITC)

RM0016

 

 

6.9.2Software priority register x (ITC_SPRx)

Address offset: 0x00 to 0x07

Reset value: 0xFF

 

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

ITC_SPR1

VECT3SPR[1:0]

 

VECT2SPR[1:0]

VECT1SPR[1:0]

VECT0SPR[1:0]

 

 

 

 

 

 

ITC_SPR2

VECT7SPR[1:0]

 

VECT6SPR[1:0]

VECT5SPR[1:0]

VECT4SPR[1:0]

 

 

 

 

 

 

ITC_SPR3

VECT11SPR[1:0]

 

VECT10SPR[1:0]

VECT9SPR[1:0]

VECT8SPR[1:0]

 

 

 

 

 

 

ITC_SPR4

VECT15SPR[1:0]

 

VECT14SPR[1:0]

VECT13SPR[1:0]

VECT12SPR[1:0]

 

 

 

 

 

 

ITC_SPR5

VECT19SPR[1:0]

 

VECT18SPR[1:0]

VECT17SPR[1:0]

VECT16SPR[1:0]

 

 

 

 

 

 

ITC_SPR6

VECT23SPR[1:0]

 

VECT22SPR[1:0]

VECT21SPR[1:0]

VECT20SPR[1:0]

 

 

 

 

 

 

ITC_SPR7

VECT27SPR[1:0]

 

VECT26SPR[1:0]

VECT25SPR[1:0]

VECT24SPR[1:0]

 

 

 

 

 

 

 

 

 

 

ITC_SPR8

 

 

Reserved

 

VECT29SPR[1:0]

VECT28SPR[1:0]

 

 

 

 

 

 

 

 

 

 

 

 

 

rw

 

rw

rw

rw

rw

 

 

 

 

 

 

 

 

 

 

Bits 7:0 VECTxSPR[1:0]: Vector x software priority bits

These eight read/write registers (ITC_SPR1 to ITC_SPR8) are written by software to define the software priority of each interrupt vector.

The list of vectors is given in Table 10: Vector address map versus software priority bits. Refer to Section 6.9.1: CPU condition code register interrupt bits (CCR) for the values to be programmed for each priority.

ITC_SPR1 bits 1:0 are forced to 1 by hardware (TLI) ITC_SPR8 bits 7:4 are forced to 1 by hardware.

Note: It is forbidden to write 10 (priority level 0). If 10 is written, the previous value is kept and the interrupt priority remains unchanged.

68/454

Doc ID 14587 Rev 9

RM0016

Interrupt controller (ITC)

 

 

6.9.3External interrupt control register 1 (EXTI_CR1)

Address offset: 0x00

Reset value: 0x00

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

 

PDIS[1:0]

 

PCIS[1:0]

 

PBIS[1:0]

 

 

PAIS[1:0]

 

 

 

 

 

 

 

 

 

 

rw

 

rw

 

rw

 

 

rw

 

 

 

 

 

 

 

 

 

Bits 7:6

PDIS[1:0]: Port D external interrupt sensitivity bits

 

 

 

These bits can only be written when I1 and I0 in the CCR register are both set to 1 (level 3). They define the sensitivity of Port D external interrupts.

00: Falling edge and low level 01: Rising edge only

10:Falling edge only

11:Rising and falling edge

Bits 5:4 PCIS[1:0]: Port C external interrupt sensitivity bits

These bits can only be written when I1 and I0 in the CCR register are both set to 1 (level 3). They define the sensitivity of Port C external interrupts.

00: Falling edge and low level 01: Rising edge only

10:Falling edge only

11:Rising and falling edge

Bits 3:2 PBIS[1:0]: Port B external interrupt sensitivity bits

These bits can only be written when I1 and I0 in the CCR register are both set to 1 (level 3). They define the sensitivity of Port B external interrupts.

00: Falling edge and low level 01: Rising edge only

10:Falling edge only

11:Rising and falling edge

Bits 1:0 PAIS[1:0]: Port A external interrupt sensitivity bits

These bits can only be written when I1 and I0 in the CCR register are both set to 1 (level 3). They define the sensitivity of Port A external interrupts.

00: Falling edge and low level 01: Rising edge only

10:Falling edge only

11:Rising and falling edge

Doc ID 14587 Rev 9

69/454

Interrupt controller (ITC)

RM0016

 

 

6.9.4External interrupt control register 1 (EXTI_CR2)

Address offset: 0x01

Reset value: 0x00

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

 

Reserved

 

 

TLIS

 

PEIS[1:0]

 

 

 

 

 

 

 

 

 

 

 

rw

 

rw

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Bits 7:3

Reserved.

 

 

 

 

 

 

Bit 2

TLIS: Top level interrupt sensitivity

 

 

 

 

This bit is set and cleared by software. This bit can be written only when external interrupt is disabled on the corresponding GPIO port (PD7 or PC3, refer to Section 6.6: External interrupts on page 65).

0:Falling edge

1:Rising edge

Bits 1:0 PEIS[1:0]: Port E external interrupt sensitivity bits

These bits can only be written when I1 and I0 in the CCR register are both set to 1 (level 3). They define the sensitivity of the Port E external interrupts.

00: Falling edge and low level 01: Rising edge only

10:Falling edge only

11:Rising and falling edge

70/454

Doc ID 14587 Rev 9

Соседние файлы в папке Минимум документации STM8_1