beautypg.com

8 receiving sof packet, 2 updating frame number automatically – NEC Network Controller uPD98502 User Manual

Page 367

background image

CHAPTER 6 USB CONTROLLER

Preliminary User’s Manual S15543EJ1V0UM

367

6.8 Receiving SOF Packet

USB Controller can receive SOF Packets, and check if Frame Number is incremented correctly.

In addition, USB Controller can detect the timing skew of SOF Packet.

6.8.1 Receiving SOF Packet and updating the Frame Number

After USB Controller receives a SOF Packet, FN field in USB Frame Number/Version Register (Address:

1000_1004H) is updated. After FN field is updated, FW bit (Bit 21) in USB General Status Register 2 (Address:

1000_1018H) is set to a ‘1’.

6.8.2 Updating Frame Number automatically

If received SOF Packet has incorrect Frame Number, USB Controller can execute one of two processes shown

below.

- USB Controller reflects the incorrect Frame Number to FN field directly.

- USB Controller increments Frame Number automatically and write the incremented value to FN field.

The policy of updating FN field is shown in following table:

Case

AU bit

Note

FN field

USB General Status Register 2

Correct SOF

0

Just load the received Frame Number

FW bit is set to 1

1

Just load the received Frame Number

FW bit is set to 1

Loss of SOF

0

Not updated

SL bit is set to 1

1

Increment the current FN

FW bit and SL bit are set to 1

Extra SOF

0

Not updated

ES bit is set to 1

1

Not updated

ES bit is set to 1

Bit Stuff Error

0

Just load the received Frame Number

FW bit is set to 1

1

Increment the current FN

FW bit is set to 1

CRC Error

0

Just load the received Frame Number

FW bit is set to 1

1

Increment the current FN

FW bit is set to 1

Incorrect Frame Number

0

Just load the received Frame Number

FW bit is set to 1

1

Increment the current FN

FW bit is set to 1

Note AU bit is in the USB General Mode Register (Address: 1000_1000H).

6.8.3 Checking if the skew of SOF arrival time is allowable of not

The allowable SOF skew can be defined by SOFINTVL field in the USB General Mode Register (Address:

1000_1000H).

Figure 6-30. Allowable Skew for SOF

Allowable

skew

Allowable

skew

1 msec

The timing

SOF comes

The timing

SOF comes

SOFINTVL field is set to 18H (24 clocks) at default. This is 0.05 % of 48000 clocks (1 msec).

The value of SOFINTVL should be set before the first SOF packet comes.