Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ARM PrimeCell generic infrared interface technical reference manual.pdf
Скачиваний:
10
Добавлен:
23.08.2013
Размер:
487.36 Кб
Скачать

Programmer’s Model

3.3Register descriptions

The following registers are described in this section:

GIRFCR: [15] (+ 0x00)

GIRTXGENCR: [16] (+ 0x04) on page 3-6

GIRRXGENCR: [16] (+ 0x08) on page 3-7

GIRTXDUTYCR: [4] (+ 0x0c) on page 3-8

GIRSTAT: [8] (+0x10) on page 3-8

GIRDATAR: [18/17] (+ 0x14c) on page 3-9

GIRIIR/GIRICR: [3/0] (+0x18) on page 3-10.

For each of the following register descriptions, the format of the title is:

Register name: [bit width] (Offset from Base)

3.3.1GIRFCR: [15] (+ 0x00)

GIRFCR is the function control register which acts as the main source of control for the infrared interface. Separate enables are provided for transmit and receive paths. In addition, the FIFOs can be separately enabled. Table 3-2 shows the bit assignments for the GIRFCR.

 

 

 

 

Table 3-2 GIRFCR register read/write bits

 

 

 

 

Bits

Name

Type

Function

 

 

 

 

31:15

 

Read/write

Reserved, do not modify, read as 0.

 

 

 

 

14

RORIntEnable

Read/write

Receive overrun interrupt enable bit.

 

 

 

1

= Interrupt is enabled whenever receive

 

 

 

overrun bit is set.

 

 

 

0

= Interrupt is disabled.

 

 

 

 

13

RxIntEnable

Read/write

Receive interrupt enable bit.

 

 

 

1

= Interrupt is enabled.

 

 

 

0

= Interrupt is disabled.

 

 

 

 

12

TxIntEnable

Read/write

Transmit interrupt enable bit.

 

 

 

1

= Interrupt is enabled.

 

 

 

0

= Interrupt is disabled.

 

 

 

 

 

3-4

© Copyright ARM Limited 1999. All rights reserved.

ARM DDI 0149B

Programmer’s Model

Table 3-2 GIRFCR register read/write bits (continued)

Bits

Name

Type

Function

 

 

 

 

11

TxIntCtrl

Read/write

Transmit interrupt control bit.

 

 

 

1

= When transmit function is enabled,

 

 

 

GIRTXINTR is raised when transmitter is not

 

 

 

busy, that is when transmission has completed

 

 

 

and TxIntEnable = 1.

 

 

 

0

= GIRTXINTR raised when transmit FIFO is

 

 

 

half full or less, independent of whether the

 

 

 

transmit function is enabled or disabled, but

 

 

 

TxIntEnable must be 1.

 

 

 

 

10

RxIntCtrl

Read/write

Receive interrupt control bit.

 

 

 

1

= When receive function is enabled,

 

 

 

GIRRXINT is raised when the receive FIFO is

 

 

 

not empty and RxIntEnable = 1.

 

 

 

0

= When receive function is enabled,

 

 

 

GIRRXINT is raised when receive FIFO is half

 

 

 

full or greater and RxIntEnable = 1.

 

 

 

 

9

TxEnable

Read/write

Enable transmit function.

 

 

 

1

= Enable transmission.

 

 

 

0

= Disable transmission.

 

 

 

 

8

RxEnable

Read/write

Enable receive function.

 

 

 

1

= Enable receiver.

 

 

 

0

= Disable receiver.

 

 

 

 

7

TxFifoEn

Read/write

Enable transmit FIFO.

 

 

 

1

= Transmit FIFO enabled to accept data.

 

 

 

0

= Transmit FIFO disabled and flushed.

 

 

 

 

6

RxFifoEn

Read/write

Enable receive FIFO.

 

 

 

1

= Receive FIFO enabled to accept data.

 

 

 

0

= Receive FIFO disabled and flushed.

 

 

 

 

5

ModEn

Read/write

Enable modulation.

 

 

 

1

= Output level is modulated with a carrier

 

 

 

signal as described below.

 

 

 

0

= Output level is set by bit 16 of the transmit

 

 

 

FIFO.

 

 

 

 

 

ARM DDI 0149B

© Copyright ARM Limited 1999. All rights reserved.

3-5

Programmer’s Model

Table 3-2 GIRFCR register read/write bits (continued)

Bits

Name

Type

Function

 

 

 

 

4

DemodEn

Read/write

Enable demodulation.

 

 

 

1 = Demodulation enabled.

 

 

 

0 = Demodulation disabled.

 

 

 

 

3:2

EdgeCtrl[1:0]

Read/write

Edge detector control bits for pulse timer in

 

 

 

receive direction:

 

 

 

00

= Edge detection disabled.

 

 

 

01

= Enable falling edges to restart timer.

 

 

 

10

= Enable rising edges to restart timer.

 

 

 

11 = Either edge restarts timer (used in

 

 

 

demodulation mode).

 

 

 

 

1:0

Winctrl[1:0]

Read/write

Limit control bits for window comparator:

 

 

 

00

= Limits set to +3 and -3.

 

 

 

01

= Limits set to +3 and -4.

 

 

 

10

= Limits set to +4 and -3.

 

 

 

11 = Limits set to +4 and -4.

 

 

 

 

 

3.3.2GIRTXGENCR: [16] (+ 0x04)

GIRTXGENCR is the transmit clock generator control register which holds the value of the divisor to be applied to the internal programmable divider for transmit functions.

When the transmit function is disabled, the value written to this register is applied directly to the internal programmable transmit clock divider. When the transmit function is enabled, changes to this register value only take effect when the associated internal counter reaches zero.

Table 3-3 on page 3-7 shows the bit assignments for the GIRTXGENCR.

3-6

© Copyright ARM Limited 1999. All rights reserved.

ARM DDI 0149B

Programmer’s Model

 

 

 

Table 3-3 GIRTXGENCR register read/write bits

 

 

 

 

Bits

Name

Type

Function

 

 

 

 

31:16

-

Read/write

Reserved, do not modify, read as 0.

 

 

 

 

15:0

clkdiv

Read/write

Divisor value for the programmable divider/clock

 

 

 

generator.

 

 

 

Value of 0 is reserved.

 

 

 

Divisor value = (clkdiv + 1).

 

 

 

If the value of clkdiv is 1, the divisor value is 2.

 

 

 

If the value of clkdiv is 2, the divisor value is 3,

 

 

 

and so on, up to a maximum divisor value of

 

 

 

65536.

 

 

 

 

3.3.3GIRRXGENCR: [16] (+ 0x08)

GIRRXGENCR is the receive clock generator control register which holds the value of the divisor to be applied to the internal programmable divider for receive functions.

When the receive function is disabled, the value written to this register is applied directly to the internal programmable receive clock divider. When the receive function is enabled, changes to this register value only take effect when the associated internal counter reaches zero. Table 3-4 shows the bit assignments for the GIRRXGENCR.

 

 

 

Table 3-4 GIRRXGENCR register read/write bits

 

 

 

 

Bits

Name

Type

Function

 

 

 

 

31:16

-

Read/write

Reserved, do not modify, read as 0.

 

 

 

 

15:0

clkdiv

Read/write

Divisor value for the programmable divider/clock

 

 

 

generator.

 

 

 

Value of 0 is reserved.

 

 

 

Divisor value = (clkdiv + 1).

 

 

 

If the value of clkdiv is 1, the divisor value is 2.

If the value of clkdiv is 2, the divisor value is 3, and so on, up to a maximum divisor value of 65536.

ARM DDI 0149B

© Copyright ARM Limited 1999. All rights reserved.

3-7