Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
AVR / datasheets / AT90USB82_162.pdf
Скачиваний:
45
Добавлен:
20.03.2015
Размер:
2.88 Mб
Скачать

Registers

USB device general registers

Figure 87. USB Device Controller Endpoint Interrupt System

 

 

 

Endpoint 4

 

 

 

Endpoint 3

 

 

 

Endpoint 2

 

 

 

Endpoint 1

 

 

 

Endpoint 0

 

OVERFI

 

 

 

UESTAX.6

 

 

 

UNDERFI

FLERRE

 

 

UESTAX.5

 

 

UEIENX.7

 

 

 

 

 

NAKINI

 

 

 

UEINTX.6

NAKINE

 

 

 

 

 

 

UEIENX.6

 

 

NAKOUTI

 

 

 

UEINTX.4

TXSTPE

 

 

 

 

Endpoint Interrupt

 

UEIENX.4

 

 

 

 

RXSTPI

 

EPINT

 

UEINTX.3

 

 

TXOUTE

UEINT.X

 

 

 

 

 

 

 

UEIENX.3

 

 

RXOUTI

 

 

 

UEINTX.2

RXOUTE

 

 

 

 

 

 

UEIENX.2

 

 

STALLEDI

 

 

 

UEINTX.1

STALLEDE

 

 

 

 

 

 

UEIENX.1

 

 

TXINI

 

 

 

UEINTX.0

TXINE

 

 

 

 

 

 

UEIENX.0

 

 

Processing interrupts are generated when:

 

• Ready to accept IN data

(EPINTx, TXINI=1)

Received OUT data

(EPINTx, RXOUTI=1)

Received SETUP

(EPINTx, RXSTPI=1)

Exception Interrupts are generated when:

 

Stalled packet

(EPINTx, STALLEDI=1)

• CRC error on OUT in isochronous mode

(EPINTx, STALLEDI=1)

Overflow

(EPINTx, OVERFI=1)

• Underflow in isochronous mode

(EPINTx, UNDERFI=1)

NAK IN sent

(EPINTx, NAKINI=1)

NAK OUT sent

(EPINTx, NAKOUTI=1)

Bit

7

6

5

4

3

2

1

0

 

 

-

-

-

-

-

RSTCPU

RMWKUP

DETACH

UDCON

Read/W

R

R

R

R

R

R/W

R/W

R/W

 

rite

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Initial

0

0

0

0

0

0

0

1

 

Value

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

• Bit 2- RSTCPU - USB Reset CPU Bit

202

7707A–AVR–01/07

Set this bit to one by firmware in order to reset the CPU at the next USB reset (without disabling the USB controller). The value of this bit will not be affected by the reset of the CPU generated by a End Of Reset (remains set). This bit is reset when the USB controller is disabled.

Set this bit to zero by firmware otherwise.

• Bit 1- RMWKUP - Remote Wake-up Bit

Set to send an “upstream-resume” to the host for a remote wake-up. The SUSPI bit must be set to allow the remote wake up to be sent.

Cleared by hardware. Clearing by software has no effect.

See Section , page 195 for more details.

• Bit 0 - DETACH - Detach Bit

Set to physically detach de device.

Clear to reconnect the device. See Section , page 194 for more details.

Bit

7

6

5

4

3

2

1

0

 

 

-

UPRSMI

EORSMI

WAKEUPI

EORSTI

SOFI

-

SUSPI

UDINT

 

 

 

 

 

 

 

 

 

 

Read/W

R

R/W

R/W

R/W

R/W

R/W

R

R/W

 

rite

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Initial

0

0

0

0

0

0

0

0

 

Value

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

• 7 - Reserved

The value read from these bits is always 0. Do not set these bits.

• 6 - UPRSMI - Upstream Resume Interrupt Flag

Set by hardware when the USB controller is sending a resume signal called “Upstream Resume”. This triggers an USB interrupt if UPRSME is set.

Shall be cleared by software (USB clocks must be enabled before). Setting by software has no effect.

• 5 - EORSMI - End Of Resume Interrupt Flag

Set by hardware when the USB controller detects a good “End Of Resume” signal initiated by the host. This triggers an USB interrupt if EORSME is set.

Shall be cleared by software. Setting by software has no effect.

• 4 - WAKEUPI - Wake-up CPU Interrupt Flag

Set by hardware when the USB controller is re-activated by a filtered non-idle signal from the lines (not by an upstream resume). This triggers an interrupt if WAKEUPE is set.

Shall be cleared by software (USB clock inputs must be enabled before). Setting by software has no effect.

See Section , page 194 for more details.

• 3 - EORSTI - End Of Reset Interrupt Flag

Set by hardware when an “End Of Reset” has been detected by the USB controller. This triggers an USB interrupt if EORSTE is set.

Shall be cleared by software. Setting by software has no effect.

• 2 - SOFI - Start Of Frame Interrupt Flag

Set by hardware when an USB “Start Of Frame” PID (SOF) has been detected (every 1 ms). This triggers an USB interrupt if SOFE is set..

203

7707A–AVR–01/07

1 - Reserved

0 - SUSPI - Suspend Interrupt Flag

Set by hardware when an USB “Suspend” ‘idle bus for 3 frame periods: a J state for 3 ms) is detected. This triggers an USB interrupt if SUSPE is set.

Shall be cleared by software. Setting by software has no effect.

See Section , page 194 for more details.

The interrupt flags bits are set even if their corresponding ‘Enable’ bits is not set.

Bit

7

6

5

4

3

2

1

0

 

 

-

UPRSME

EORSME

WAKE-

EORSTE

SOFE

-

SUSPE

UDIEN

 

 

 

 

UPE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Read/W

R

R/W

R/W

R/W

R/W

R/W

R

R/W

 

rite

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Initial

0

0

0

0

0

0

0

0

 

Value

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

• 7 - Reserved

The value read from these bits is always 0. Do not set these bits.

• 6 - UPRSME - Upstream Resume Interrupt Enable Bit

Set to enable the UPRSMI interrupt.

Clear to disable the UPRSMI interrupt.

• 5 - EORSME - End Of Resume Interrupt Enable Bit

Set to enable the EORSMI interrupt.

Clear to disable the EORSMI interrupt.

• 4 - WAKEUPE - Wake-up CPU Interrupt Enable Bit

Set to enable the WAKEUPI interrupt.

Clear to disable the WAKEUPI interrupt.

• 3 - EORSTE - End Of Reset Interrupt Enable Bit

Set to enable the EORSTI interrupt. This bit is set after a reset.

Clear to disable the EORSTI interrupt.

• 2 - SOFE - Start Of Frame Interrupt Enable Bit

Set to enable the SOFI interrupt.

Clear to disable the SOFI interrupt.

1 - Reserved

0 - SUSPE - Suspend Interrupt Enable Bit

Set to enable the SUSPI interrupt.

Clear to disable the SUSPI interrupt.

Bit

7

6

5

4

3

2

1

0

 

 

ADDEN

UADD6:0

 

 

 

 

 

 

UDADDR

 

 

 

 

 

 

 

 

 

 

Read/W

R/W

R/W

R

R

R

R

R

R

 

rite

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Initial

0

0

0

0

0

0

0

0

 

Value

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

204

7707A–AVR–01/07

• 7 - ADDEN - Address Enable Bit

Set to activate the UADD (USB address).

Cleared by hardware. Clearing by software has no effect.

See Section , page 194 for more details.

• 6-0 - UADD6:0 - USB Address Bits

Set to configure the device address.

Shall not be cleared.

Bit

7

6

5

4

3

2

1

0

 

 

-

-

-

-

-

FNUM10:8

 

 

UD-

 

 

 

 

 

 

 

 

 

FNUMH

 

 

 

 

 

 

 

 

 

 

Read/W

R

R

R

R

R

R

R

R

 

rite

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Initial

0

0

0

0

0

0

0

0

 

Value

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

• 7-3 - Reserved

The value read from these bits is always 0. Do not set these bits.

• 2-0 - FNUM10:8 - Frame Number Upper Flag

Set by hardware. These bits are the 3 MSB of the 11-bits Frame Number information. They are provided in the last received SOF packet. FNUM is updated if a corrupted SOF is received.

Bit

7

6

5

4

3

2

1

0

 

 

FNUM7:0

 

 

 

 

 

 

 

UDFNUML

 

 

 

 

 

 

 

 

 

 

Read/W

R

R

R

R

R

R

R

R

 

rite

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Initial

0

0

0

0

0

0

0

0

 

Value

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

• 7-0 Frame Number Lower Flag

Set by hardware. These bits are the 8 LSB of the 11-bits Frame Number information.

Bit

7

6

5

4

3

2

1

0

 

 

-

-

-

FNCERR

-

-

-

-

UDMFN

 

 

 

 

 

 

 

 

 

 

Read/W

R

R

R

R/W

R

R

R

R

 

rite

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Initial

0

0

0

0

0

0

0

0

 

Value

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

• 7-5 - Reserved

The value read from these bits is always 0. Do not set these bits.

• 4 - FNCERR -Frame Number CRC Error Flag

Set by hardware when a corrupted Frame Number in start of frame packet is received.

This bit and the SOFI interrupt are updated at the same time.

• 3-0 - Reserved

The value read from these bits is always 0. Do not set these bits.

205

7707A–AVR–01/07

Соседние файлы в папке datasheets