Philips Semiconductors
Interconnectivity
_______________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
11 Jan 1999
PDIUSBH11A / H12
Hub / Monitor Firmware
Application Notes
Interconnectivity
Page 2 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
This document describes the programming features of the PDIUSBH11A. Examples of how to
program any C51-based micro-controller to control the hub and embedded function are provided in
the following sections:
•
Main control loop;
•
Hub control subroutine;
•
Embedded function control subroutine.
0 Introduction
Philips Semiconductors’ PDIUSBH11A is a compound Universal Serial Bus (USB) hub IC (hub plus
embedded function) that supports 4 downstream devices. (Figure 1). The embedded function
appears as PORT1 to the host and the four downstream ports are numbered 2 through 5.
It is used in a micro-controller-based system and communicates with the system micro-controller
over the I
2
C serial bus. This modular approach to implementing a hub and embedded function
allows the designer to maintain the system micro-controller of choice and retain the existing
architecture. This cuts down development time and offers the most cost-effective solution.
Ideal applications for the IC include computer monitors and keyboards.
The PDIUSBH11A conforms to the USB specification 1.1 and I
2
C serial interface specification. It is
also compliant with the USB Human Input Device and Monitor Control Class specifications.
U S B
H u b
D e v i c e
1
D e v i c e
2
D e v i c e
3
D e v i c e
4
D o w n s t r e a m
D o w n s t r e a m
D o w n s t r e a m
D o w n s t r e a m
U p s t r e a m
H o s t
M i c r o - c o n t r o l l e r
I
2
C
Figure 1: Application Diagram
0.1 I
2
C Interface
Interconnectivity
Page 3 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
An external micro-controller is used to control the operation of the hub using the I
2
C bus. To reduce
costs, the target system micro-controller can be shared and utilised for this purpose. The
PDIUSBH11A implements a slave I
2
C interface. When the PDIUSBH11A needs to communicate
with the micro-controller, it asserts an interrupt signal. The micro-controller services this interrupt by
reading the appropriate status register on the PDIUSBH11A through the I
2
C bus. (Figure 2).
H11 HUB
Upstream
Downstream
Controller
Interrupt
Reset_H11
Command
Data
Figure 2: Interactions between micro-controller and hub
0.2 Programming Methodology
The I
2
C interface on the PDIUSBH11A defines two types of transactions:
•
Command transaction
.
A command transaction is used to define which data (e.g. status byte, buffer data…) will be read
from / written to the USB interface in the next data transaction. A data transaction usually follows
a command transaction.
•
Data transaction.
A data transaction reads data from / writes data to the USB interface. The meaning of the data is
dependent on the command transaction that was sent before the data transaction.
Different addresses are used for command and data transactions. Writing to the command
address is interpreted as a command, while reading from / writing to the data address is used to
transfer data between the PDIUSBH11A and the controller.
Address Table:
Type of Address
Physical Address (MSB to LSB)
Interconnectivity
Page 4 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
Command
0011011 (binary)
Data
0011010 (binary)
Programming the PDIUSBH11A consists of two steps:
Command Phase – Write the command code to the Command Address
Data Phase – Write data to or read data from the Data Address.
Command codes are listed in the PDIUSBH11A data sheet.
1 Initialization
The initialization of the PDIUSBH11A is described in the following flowchart:
"Disconnect" H11A.
Set appropriate
configuration modes.
100ms delay loop
Connect H11A.
Initialize internal flags.
Figure 3 Flowchart of initialization
2 Main Control Loop
Upon finishing initialization, the program goes into the so-called main loop waiting for the interrupt
pin of the PDIUSBH11A to go low, signalling that a request has been initiated. The micro-controller
then reads the interrupt register to determine the origin of the interrupt. Control is then passed to the
appropriate endpoint subroutine for further processing. (Figure 3).
After a bus reset, an interrupt will also be generated. However all bits in the interrupt register will be
zeroes. The firmware must enable the hub, set its address to 0 and disable the embedded function.
Interconnectivity
Page 5 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
Read Interrupt
Register
Interrupt
pin low?
No
USB Routine
Is packet
for Hub Control
Out Endpoint?
No
Hub
Endpoint0
Out
Yes
Is packet
for Hub Control
In Endpoint?
Is packet
for Function Control
Out Endpoint?
No
Is packet
for Function Control
In Endpoint?
No
No
Hub
Endpoint0
In
Yes
Func.
Endpoint0
Out
Yes
Func.
Endpoint0
In
Yes
Host sends reset signal to Hub:
1. Enable Hub at address 0
2. Disable embedded function
The main flow chart
of USB control routine
Main
Figure 4: Main Control Loop
Interconnectivity
Page 6 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
3 Hub Control Subroutine
3.1 Hub Control In Endpoint
Data to be sent to the host are written to the IN buffer and will be transferred when the next IN token
is received. A Read Last Transaction Status command is sent to reset the interrupt flag before
issuing a Select Endpoint command which initialises the internal pointer to the start of the selected
buffer. Previous data in the buffer must be transferred before further processing can take place. If
the last request is a Set Address command, the new address is written to the device. (Figure 4).
Read Last Hub
Transaction Status
Select Hub Endpoint0
In and read one byte
Buffer
empty?
No
Yes
Hub Control Endpoint In
Flow chart
Are all data
sent to host?
Yes
Send 8 bytes data
Yes
No
to host
No
Is last command
" Set address"?
Change Hub address
Hub
Endpoint0
In
Main
Main
Figure 5: Hub Control In Endpoint Flow Chart
Interconnectivity
Page 7 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
3.2 Hub Control Out Endpoint
A packet consisting of a SETUP token precedes all requests. After selecting the hub endpoint, the
Read Endpoint Status command ensures that a SETUP token has been received. The Acknowledge
Setup command is given to unlock both the IN and OUT buffers before the next packet, which
contains the actual request, is read. (Figure 5).
Control is then transferred to the appropriate routine where the request is carried out. (Figure 6 &
Figure 7). When an unsupported command is encountered, a stall status is returned to the host.
There are two types of commands:
Hub Standard Commands
Hub Class Commands
3.3 Standard Commands
Flow charts for supported standard commands are shown as follows:
Ø
Clear Feature (Figure 8)
Ø
Set Feature (Figure 9)
Ø
Get Status (Figure 10)
Ø
Set Address (Figure 11)
Ø
Get Descriptor (Figure 12)
Ø
Get Configuration (Figure 13)
Ø
Set Configuration (Figure 14)
Ø
Get Interface (Figure 15)
Ø
Set Interface (Figure 15)
H u b
Endpoint0
O u t
Select Hub Control
Endpoint Out
Read Hub Control
Endpoint Status
Setup
packet ?
N o
FIFO
S e n d A C K _ Setup command to:
Hub Control Endpoint In
Hub Control Endpoint Out
Y e s
Read 10 bytes from
Hub Control Endpoint Out
Flow chart
Send Clear Buffer
c o m m a n d
C
M a i n
Figure 5: Hub Control Out Endpoint Flow Chart...(1)
Interconnectivity
Page 8 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
Get
Status
" Clear Feature "
command ?
No
" Set Feature "
Command ?
No
" Set Address "
command ?
No
No
D
Clear
Feature
Yes
Set
Feature
Yes
Yes
Set
Address
C
Does host send
8 bytes to H11?
No
" Get Status"
command ?
Yes
standard command ?
Yes
No
Hub Class
command
Yes
Main
Figure 6: Hub Control Out Endpoint Flow Chart...(2)
command ?
No
" Get Interface "
command ?
No
" Set Interface "
command ?
No
No
Set
Config
Yes
Yes
Get
Interface
Set
Interface
Yes
Send " Stall" to Hub
Control Endpoint0 In
Un supported
command
" Set Config "
Get
Descriptor
D
" Get Config "
command ?
Get
Config
Yes
" Get Descriptor "
command ?
No
Yes
Main
Interconnectivity
Page 9 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
Figure 7: Hub Control Out Endpoint Flow Chart...(3)
Feature selectors are used when enabling or disabling features specific to a device, interface or
endpoint. The values for the feature selectors are given below.
Feature Selector
Recipient
Value
DEVICE_REMOTE_WAKEUP
Device
1
ENDPOINT_STALL
Endpoint
0
3.3.1 Clear Feature
This command is used to clear or disable a specific feature.
Interconnectivity
Page 10 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
Clear
Feature
Is recipient Device?
Unsupported
command
Is recipient Interface?
Is recipient Endpoint?
No
Yes
No
Yes
No
Clear endpoint feature
according to
"Feature Selector"
Send zero length
packet
Clear device feature
according to
"Feature Selector"
Yes
Main
Figure 8: Hub
Clear Feature Standard Command
3.3.2 Set Feature
This command is used to set or enable a specific feature.
Interconnectivity
Page 11 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
S e t d e v i c e f e a t u r e
a c c o r d i n g t o
" F e a t u r e S e l e c t o r "
S e t
F e a t u r e
I s r e c i p i e n t D e v i c e ?
Y e s
N o
I s r e c i p i e n t I n t e r f a c e ?
I s r e c i p i e n t E n d p o i n t ?
Y e s
N o
Y e s
U n s u p p o r t e d
c o m m a n d
N o
S e t e n d p o i n t f e a t u r e
a c c o r d i n g t o
" F e a t u r e S e l e c t o r "
S e n d z e r o l e n g t h
p a c k e t
M a i n
Figure 9: Hub Set Feature Standard Command
3.3.3 Get Status
This command returns status for the specified recipient.
G e t
Status
Is recipient Device?
Is recipient Interface?
Is recipient Endpoint?
Return
Hub Status to host
Yes
N o
Return Hub
Interface Status to host
Yes
N o
Return Hub
Endpoint Status to host
Yes
Unsupported
c o m m a n d
N o
M a i n
M a i n
M a i n
Figure 10: Hub Get Status Standard Command
3.3.4 Set Address
This command sets the device address for all future device accesses.
Interconnectivity
Page 12 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
S e t
A d d r e s s
U p d a t e n e w a d d r e s s
t o H u b
a d d r e s s r e g i s t e r
S e n d z e r o l e n g t h
p a c k e t
M a i n
Figure 11: Hub Set Address Standard Command
3.3.5 Get Descriptor
This command returns the specified descriptor if the descriptor exists.
Get
Descriptor
Is descriptor type
"device"?
Is descriptor type
"configuration" ?
Send first 8 bytes
of Device descriptor
Yes
No
Yes
No
Send first 8 bytes of
Configuration descriptor
Send Stall
Main
Figure 12: Hub Get Descriptor Standard Command
3.3.6 Get Configuration
This command returns the current device configuration.
Interconnectivity
Page 13 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
G e t
C o n f i g
H a s H u b b e e n
" C o n f i g u r e d " ?
S e n t " 1 " t o H o s t
S e n t " 0 " t o H o s t
Y e s
N o
M a i n
Figure 13: Hub Get Configuration Standard Command
3.3.7
Set Configuration
This command sets the device configuration.
Set
Config
Does Host send
"0" to Hub?
Does Host send
"1" to Hub?
Clear Hub configuration
flag
Yes
No
Set Hub
configuration flag
Yes
Send zero length packet
Unsupported
Command
No
Main
Figure 14: Hub Set Configuration Standard Command
3.3.8 Set Interface
This command allows the host to select an alternate setting for the specified interface.
Interconnectivity
Page 14 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
3.3.9 Get Interface
This command returns the selected alternate setting for the specified interface
Get
Interface
Send "0" to Host
Set
Interface
Send zero length packet
Main
Main
Figure 15: Hub Get & Set Interface Standard Commands
Interconnectivity
Page 15 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
3.4 Hub Class Commands
Hub class commands are commands that are only applicable to the hub and are processed as
shown in Figure 16.
Flow charts for the supported class commands are shown as follows:
Ø
Clear Hub/Port Feature (Figure 17)
Ø
Set Hub/Port Feature (Figure 18)
Ø
Get Hub/Port Status (Figure 19)
Ø
Get Hub Descriptor (Figure 20)
" Clear Hub Feature"
command ?
Clear Hub/Port
Feature
Yes
No
" Set Hub Feature"
Command ?
No
" Get Hub descriptor"
command ?
No
No
Yes
Set Hub/Port
Feature
Get Hub
Descriptor
Yes
Unsupported
command
Hub class
Command
" Get Hub Status "
command ?
Get Hub/Port
Status
Yes
No
Figure 16: Hub Class Command Flow Chart
Interconnectivity
Page 16 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
Feature selectors are also used when enabling or disabling features specific to a hub or port. The
following are the valid feature selectors for the hub class.
Feature Selector
Recipient
Value
C_HUB_LOCAL_POWER
Hub
0
C_HUB_OVER_CURRENT
Hub
1
PORT_CONNECTION
Port
0
PORT_ENABLE
Port
1
PORT_SUSPEND
Port
2
PORT_OVER_CURRENT
Port
3
PORT_RESET
Port
4
PORT_POWER
Port
8
PORT_LOW_SPEED
Port
9
C_PORT_CONNECTION
Port
16
C_PORT_ENABLE
Port
17
C_PORT_SUSPEND
Port
18
C_PORT_OVER_CURRENT
Port
19
C_PORT_RESET
Port
20
Interconnectivity
Page 17 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
3.4.1 Clear Hub/Port Feature
This command resets a value reported in the hub/port status.
C l e a r
H u b / P o r t
F e a t u r e
Is recipient Hub?
Is recipient Port?
Y e s
N o
Y e s
N o
U n s u p p o r t e d
c o m m a n d
Clear Hub feature
according to
"Feature Selector"
Clear Port feature
according to
"Feature Selector"
M a i n
M a i n
Figure 17: Clear Hub/Port Feature Command
3.4.2 Set Hub/Port Feature
This command sets a value reported in the hub/port status.
S e t H u b / P o r t
F e a t u r e
I s r e c i p i e n t H u b ?
I s r e c i p i e n t P o r t ?
Y e s
N o
Y e s
N o
U n s u p p o r t e d
c o m m a n d
S e t H u b f e a t u r e
a c c o r d i n g t o
" F e a t u r e S e l e c t o r "
S e t P o r t f e a t u r e
a c c o r d i n g t o
" F e a t u r e S e l e c t o r "
M a i n
M a i n
Figure 18: Set Hub/Port Feature Command
3.4.3 Get Hub/Port Status
Interconnectivity
Page 18 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
This command returns the current hub/port status and the states that have changed since the
previous acknowledgment.
G e t H u b / P o r t
S t a t u s
I s r e c i p i e n t H u b ?
I s r e c i p i e n t P o r t ?
R e t u r n
H u b S t a t u s
t o h o s t
Y e s
N o
R e t u r n
P o r t S t a t u s t o h o s t
Y e s
N o
U n s u p p o r t e d
c o m m a n d
M a i n
M a i n
Figure 19: Get Hub/Port Status Command
3.4.4 Get Hub Descriptor
This command returns the hub descriptor.
G e t H u b
D e s c r i p t o r
I s d e s c r i p t o r t y p e
" H u b " ?
S e n d f i r s t 8 b y t e s
o f D e v i c e d e s c r i p t o r
Y e s
N o
U n s u p p o r t e d
C o m m a n d
M a i n
Figure 20: Get Hub Descriptor Command
Interconnectivity
Page 19 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
4 Embedded Function Control Subroutine
The host sees no difference between the embedded function and a function connected to one of the
downstream ports. Some of the port commands sent by the host must be handled appropriately by
the embedded function to appear as any other downstream port.
The examples in this section assume the use of an embedded function in a display monitor. Packets
sent to the embedded function control endpoints are processed in a similar manner as those sent to
the endpoints of the hub.
4.1 Function Control In Endpoint
Data to be sent to the host from the embedded function follows the same procedure as that for the
hub control in endpoint. (Figure 21).
Func.
Endpoint0
In
Read Embedded Func.
Last Transaction Status
Select Embedded
Func. endpoint0 In
and read one byte
Embedded Func. Control Endpoint In
Flow chart
Buffer
empty?
No
Yes
No
Send 8 bytes data
to Host
No
Is last command
" Set address"?
Are all data
sent to Host?
Yes
Change Embedded
Func address
Yes
Main
Main
Figure 21: Embedded Function Control In Endpoint Flow Chart
Interconnectivity
Page 20 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
4.2 Function Control Out Endpoint
Besides processing the SETUP token, the OUT token, which sends updated data to the display
monitor control program, is also processed.
Embedded function commands are grouped as follows:
q
Embedded Function Standard Commands
q
Embedded Function Class Commands
Commands that are not supported will return a stall status.
4.3 Standard Commands
Figure 22 – Figure 24 show the processing of standard commands.
Flow charts for the supported standard commands are shown as follows:
Ø
Get Function Status (Figure 25)
Ø
Clear Function Feature (Figure 26)
Ø
Set Function Feature (Figure 27)
Ø
Set Function Address (Figure 28)
Ø
Get Function Descriptor (Figure 29)
Ø
Get Function Configuration (Figure 30)
Ø
Set Function Configuration (Figure 31)
Ø
Get Function Interface (Figure 32)
Ø
Set Function Interface (Figure 32)
F u n c .
E n d p o i n t 0
O u t
S e l e c t E m b e d d e d F u n c .
Control Endpoint Out
R e a d E m b e d d e d F u n c .
Control Endpoint Status
E m b e d d e d F u n c . Control Endpoint Out
Flow chart
Setup
packet ?
S e n d A C K _Setup c o m m a n d t o :
F u n c . Control Endpoint In
F u n c . Control Endpoint Out
Y e s
Read 10 bytes from
F I F O
Send Clear Buffer
c o m m a n d
E
I s l a s t c o m m a n d
”Feature Report”
Y e s
D o e s H o s t
send 3 bytes to
e m b e d d e d f u n c .
S e n d D A C v a l u e t o
monitor
Y e s
Send zero length packet
t o H o s t
N o
N o
M a i n
N o
Figure 22: Embedded Function Control Out Endpoint Flow Chart...(1)
Interconnectivity
Page 21 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
N o
" C l e a r F e a t u r e "
c o m m a n d ?
" Set Feature "
c o m m a n d ?
N o
" Set Address "
c o m m a n d ?
N o
N o
F
C l e a r
F u n c
F e a t u r e
Y e s
S e t F u n c
F e a t u r e
Y e s
Y e s
S e t F u n c
A d d r e s s
G e t
f u n c S t a t u s
Y e s
N o
E
D o e s H o s t s e n d
8 bytes to F u n c ?
" Get Status"
c o m m a n d ?
N o
s t a n d a r d c o m m a n d ?
Y e s
Y e s
F u n c C l a s s s
c o m m a n d
N o
M a i n
Figure 23: Embedded Function Control Out Endpoint Flow Chart...(2)
" Set Config "
command ?
" Get Interface "
command ?
No
" Set Interface "
command ?
No
No
Set Func
Config
Yes
Yes
Get Func
Interface
Set Func
Interface
Yes
Unsupported
command
F
" Get Config "
command ?
No
Get Func
Config
Yes
" Get Descriptor "
command ?
Get Func
Descriptor
Yes
No
Figure 24: Embedded Function Control Out Endpoint Flow Chart...(3)
Interconnectivity
Page 22 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
4.3.1 Get Function Status
Get Func.
Status
Is recipient Device?
Is recipient Interface?
Is recipient Endpoint?
R e t u r n E m b e d d e d
F u n c Status to Host
Yes
No
R e t u r n E m b e d d e d Func
Interface Status to Host
Yes
No
R e t u r n E m b e d d e d Func .
Endpoint Status to Host
Yes
Unsupported
command
No
M a i n
M a i n
M a i n
Figure 25: Embedded Function Get Status Standard Command
4.3.2 Clear Function Feature
Clear Func.
Feature
Is recipient Device?
Is recipient Interface?
Yes
No
No
Unsupported
command
Is recipient Endpoint?
feature according to
"Feature Selector"
Yes
according to
Clear Embedded Func
endpoint feature
"Feature Selector"
Send zero length packet
Yes
No
Main
Clear Embedded Func.
Figure 26: Embedded Function Clear Feature Standard Command
4.3.3 Set Function Feature
Interconnectivity
Page 23 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
Is recipient Interface?
Is recipient Endpoint?
Yes
N o
Yes
Unsupported
c o m m a n d
N o
S e t E m b e d d e d F u n c .
e n d p o i n t f e a t u r e
a c c o r d i n g t o
" F e a t u r e S e l e c t o r "
S e n d z e r o l e n g t h p a c k e t
Set Func
Feature
I s r e c i p i e n t D e v i c e ?
S e t E m b e d d e d F u n c.
d e v i c e f e a t u r e
a c c o r d i n g t o
" F e a t u r e S e l e c t o r "
Yes
N o
M a i n
Figure 27: Embedded Function Set Feature Standard Command
4.3.4 Set Function Address
S e t F u n c .
A d d r e s s
U p d a t e n e w a d d r e s s
t o E m b e d d e d F u n c.
a d d r e s s r e g i s t e r
S e n d z e r o l e n g t h
p a c k e t
M a i n
Figure 28: Embedded Function Set Address Standard Command
4.3.5 Get Function Descriptor
Interconnectivity
Page 24 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
Get Func.
Descriptor
Is descriptor type
"device"?
Is descriptor type
"configuration" ?
Send first 8 bytes
o f E m b e d d e d F u n c .
Device descriptor
Yes
N o
Yes
N o
Send first 8 bytes of
Embedded Func.
Configuration descriptor
Send Stall
Main
Figure 29: Embedded Function Get Descriptor Standard Command
4.3.6 Get Function Configuration
G e t F u n c .
C o n f i g
H a s
E m b e d d e d F u n c . b e e n
" C o n f i g u r e d " ?
S e n t " 1 " t o h o s t
S e n t " 0 " t o h o s t
M a i n
y e s
n o
Figure 30: Embedded Function Get Configuration Standard Command
4.3.7 Set Function Configuration
Interconnectivity
Page 25 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
Set Func.
Config
Does host
send "0" to Embedded
Func.?
Does host
send "1" to Embedded
Func.?
Clear Embedded Func.
configuration flag
Yes
No
Set Embedded Func
configuration flag
Yes
Send zero length
packet
Unsupported
Command
No
Main
Figure 31: Embedded Function Set Configuration Standard Command
4.3.8 Get/Set Function Interface
G e t F u n c .
I n t e r f a c e
S e n d " 0 " t o H o s t
S e t F u n c .
I n t e r f a c e
S e n d z e r o l e n g t h
p a c k e t
M a i n
M a i n
Figure 32: Embedded Function Get/Set Interface Standard Command
Interconnectivity
Page 26 of 27
PDIUSBH11A / H12 - Hub / Monitor Firmware Application Notes
_________________________________________________________________________________________________
Philips Semiconductors - Asia Product Innovation Centre
Visit
http://www.flexiusb.com
4.4 Examples of Class Commands
Figure 33 and Figure 34 show the flow charts for the following supported monitor class commands:
Ø
Set Report
Ø
Get Report
F u n c . c l a s s
C o m m a n d
" G e t R e p o r t " c l a s s
c o m m a n d ?
N o
G e t R e p o r t
Y e s
U n s u p p o r t e d
c o m m a n d
" S e t R e p o r t " c l a s s
c o m m a n d ?
S e t R e p o r t
Y e s
N o
Figure 33: Embedded Function Class Command Flow Chart
Set Rep ort
“feature report” ?
Set feature report flag
& wait for next OUT
token for D A C v alue
Yes
No
Unsupported
command
Get Report
Send DAC
data according
to VES A op code
Main
Main
Yes
N o
“fea ture re port”?
U nsupported
Command
Figure 34: Embedded Function Monitor Class Command