CY7C67300

Register Description

The Host n Count register is used to hold the number of bytes (packet length) for the current transaction. The maximum packet length is 1023 bytes in ISO mode. The Host Count value is used to determine how many bytes to transmit, or the maximum number of bytes to receive. If the number of received bytes is greater then the Host Count value then an overflow condition is flagged by the Overflow bit in the Host n Endpoint Status register.

Port Select (Bit 14)

The Port Select bit selects which of the two active ports is selected and is summarized in Table 51.

1:Port 1B or Port 2B is enabled

0:Port 1A or Port 2A is enabled

Host n Endpoint Status Register [R]

Host 1 Endpoint Status Register 0xC086

Host 2 Endpoint Status Register 0xC0A6

Table 52. Host n Endpoint Status Register

Table 51. Port Select Definition

Port Select

Host/Device 1

Host/Device 2

Active Port

Active Port

 

0

A

A

 

 

 

1

B

B

 

 

 

Count (Bits [9:0])

The Count field sets the value for the current transaction data packet length. This value is retained when switching between host and device mode, and back again.

Reserved

Write all reserved bits with ’0’.

Bit #

15

14

 

13

12

11

10

9

 

8

Field

 

Reserved

 

 

Overflow

Underflow

 

Reserved

 

 

 

 

 

Flag

Flag

 

 

 

Read/Write

-

-

 

-

-

R

R

-

 

-

Default

0

0

 

0

0

0

0

0

 

0

Bit #

7

6

5

4

3

2

1

0

 

Stall

NAK

Length

Reserved

Sequence

Timeout

Error

ACK

Field

Flag

Flag

Exception

 

Status

Flag

Flag

Flag

 

 

Flag

 

 

 

 

 

Read/Write

R

R

R

-

R

R

R

R

Default

0

0

0

0

0

0

0

0

Register Description

The Host n Endpoint Status register is a read only register that provides status for the last USB transaction.

Overflow Flag (Bit 11)

The Overflow Flag bit indicates that the received data in the last data transaction exceeded the maximum length specified in the Host n Count register. The Overflow Flag must be checked in response to a Length Exception signified by the Length Exception Flag set to ‘1’.

1:Overflow condition occurred

0:Overflow condition did not occur

Underflow Flag (Bit 10)

The Underflow Flag bit indicates that the received data in the last data transaction was less than the maximum length specified in the Host n Count register. The Underflow Flag must be checked in response to a Length Exception signified by the Length Exception Flag set to ‘1’.

1:Underflow condition occurred

0:Underflow condition did not occur

Stall Flag (Bit 7)

The Stall Flag bit indicates that the peripheral device replied with a Stall in the last transaction.

1:Device returned Stall

0:Device did not return Stall

NAK Flag (Bit 6)

The NAK Flag bit indicates that the peripheral device replied with a NAK in the last transaction.

1:Device returned NAK

0:Device did not return NAK

Length Exception Flag (Bit 5)

The Length Exception Flag bit indicates that the received data in the data stage of the last transaction does not equal the maximum Host Count specified in the Host n Count register. A Length Exception can either mean an overflow or underflow and the Overflow and Underflow flags (bits 11 and 10, respectively) must be checked to determine which event occurred.

1:An overflow or underflow condition occurred

0:An overflow or underflow condition did not occur

Document #: 38-08015 Rev. *J

Page 31 of 99

[+] Feedback

Page 31
Image 31
Cypress CY7C67300 manual Port Select Bit, Underflow Flag Bit, Stall Flag Bit, NAK Flag Bit, Length Exception Flag Bit