ISP1362EE/01 PHILIPS [NXP Semiconductors], ISP1362EE/01 Datasheet - Page 25

no-image

ISP1362EE/01

Manufacturer Part Number
ISP1362EE/01
Description
Single-chip Universal Serial Bus On-The-Go controller
Manufacturer
PHILIPS [NXP Semiconductors]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ISP1362EE/01
Manufacturer:
KAWASAKI
Quantity:
1 200
Part Number:
ISP1362EE/01
Manufacturer:
PHILIPS/飞利浦
Quantity:
20 000
Philips Semiconductors
9397 750 12337
Product data
9.5.2 PIO access to the buffer memory by using indirect addressing
Starting address — Location to start writing or reading
Data length — Number of bytes to write or read.
The following is a sample code for setting the HcDirectAddressLength register:
void Set_DirAddrLen(unsigned int data_length,unsigned int addr)
{
}
After the proper value is written to the HcDirectAddressLength register, data is
accessible from the HcDirectAddressData register (called as HcDirAddr_Port in the
following sample code). A sample code for writing word_size bytes of data from
*w_ptr to the memory locations of the ISP1362 buffer starting from the address
start_addr is as follows:
void direct_write(unsigned int *w_ptr,unsigned int
start_addr,unsigned int word_size)
{
}
Direct addressing allows fast and random access to any location within the ISP1362
memory. Your program, however, needs the address location of each buffer area to
access them.
Indirect addressing is the addressing method that is compatible with the Philips
ISP1161 addressing mode. This method uses a unique data port for each buffer
memory area (ATL, INTL, ISTL0 and ISTL1). These four data areas share the
HcTransferCounter register that is used to indicate the number of bytes to be
transferred.
A sample code for writing an array at *a_ptr into the ATL memory area with word_size
as the word size is given as follows:
void write_atl(unsigned int *a_ptr, unsigned int word_size)
{
unsigned long RegData = 0;
RegData =(long)(addr&0x7FFF);
RegData|=(((long)data_length)<<16);
write_reg32(HcDirAddrLen,RegData);
unsigned int cnt=0;
Set_DirAddrLen(word_size*2,start_addr);
outport(hc_com,HcDirAddr_Port|0x80); // hc_com is system address of
do
{
outport(hc_data,*(w_ptr+cnt)); // hc_data is system address of
cnt++;
}
while(cnt<word_size);
int cnt;
Rev. 03 — 06 January 2004
// HC data port
// HC command port
Single-chip USB OTG controller
© Koninklijke Philips Electronics N.V. 2004. All rights reserved.
ISP1362
25 of 150

Related parts for ISP1362EE/01