ISP1160
Embedded USB Host Controller
Philips Semiconductors
//write 80 (0x50) bytes of data into ATL buffer RAM
for (i=0;i<wCount;i++)
{
outport(HcDataPort,PTDData[i]);
};
//Check EOT interrupt bit
wData = HcRegRead(wHcuPInterrupt);
printf("\n HC Interrupt Status = %xH.\n",wData);
//Check Buffer status register
wData = HcRegRead(wHcBufferStatus);
printf("\n HC Buffer Status = %xH.\n",wData);
}
//
// Read HC 16-bit registers
//
unsigned int HcRegRead(unsigned int wIndex)
{ unsigned int wValue;
outport(HcCmdPort,wIndex & 0x7f);
wValue = inport(HcDataPort);
return(wValue);
}
//
// Write HC 16-bit registers
//
void HcRegWrite(unsigned int wIndex,unsigned int wValue)
{
outport(HcCmdPort,wIndex | 0x80);
outport(HcDataPort,wValue);
}
Table 6:
Run results of the C program example
Observed items
HC not initialized and not in HC initialized and in
Comments
USBOperational state
USBOperational state
HcµPInterrupt register
Bit 1 (ATLInt)
0
1
1
1
microprocessor must read ATL
transfer completed
Bit 2 (AllEOTInterrupt)
HcBufferStatus register
Bit 2 (ATLBufferFull)
Bit 5 (ATLBufferDone)
USB traffic on USB Bus
1
0
1
1
transfer completed
PTD data processed by HC
OUT packets can be seen
no
yes
9.5 HC operational model
Upon power up, the HCD sets up all operational registers (32-bit). The
FSLargestDataPacket field (bits 30 to 16) of the HcFmInterval register (0DH to read,
8DH to write) and the HcLSThreshold register (11H to read, 91H to write) determine
9397 750 11371
© Koninklijke Philips Electronics N.V. 2003. All rights reserved.
Product data
Rev. 04 — 04 July 2003
28 of 88