Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

USB hosts hubs transceivers Forum Discussions

grsc_1206411
Level 1
Level 1

I am trying to follow AN6010 in order to enumerate a keyboard via the HPI coprocessor interface on the CY7C67200 device.

The example uses SIE1 (Port 0), while my setup is using SIE2 (Port 2?).

I believe I have successfully completed Steps 1a and 1b while making modifications for the corresponding registers related to SIE2 vs. SIE1.

These are the initialization steps so far:

Step 1a:

Write 0x0000 to SIE2msg Register (0x0148).

Write 0xFFFF to Host 2 Status Register (0xC0B0).

Write 0x12C0 to HUSB_pEOT Register (0x01B4).

Write 0x3080 to Interrupt Routing Register (0x0142).

Write 0x0030 to Host 2 Interrupt Enable Register (0xC0AC).

Step 1b:

Write 0x0073 to COMM_INT_NUM (0x01C2). (HUSB_SIE2_INIT_INT)

Write 0xCE01 to HPI Mailbox (COMM_EXEC_INT).

At this point, I detect the HPI_INT and read the HPI STATUS and HPI Mailbox and verify that the COMM_ACK has been received successfully.

Prior to starting Step 2, I attach the keyboard to Port 2A.

Step 2:

Write 0x0074 to COMM_INT_NUM (0x01C2).

Write 0x003C to COMM_R0 (0x01C4).

Write 0x0002 to COMM_R1 (0x01C6).  (Not sure if 2 is the correct port number for Port 2A on the CY7C67200?)

Write 0xCE01 to HPI Mailbox (COMM_EXEC_INT).

At this point, I detect a HPI_INT and read a value of 0x1001 from the HPI_Status register (which I believe indicates a SOF/EOP2 and an incoming mailbox interrupt).

I read the mailbox and see 0x0FED, and this clears the mailbox interrupt.

However, I'm not sure how to deal with the SOF interrupt.  Does anyone know how to service this interrupt to clear the status bit?

I've tried reading SIE2msg Register (0x0148), reading and writing R0-R13, and reading the Host 2 Status Register (0xC0B0), but none of these seem to clear the SOF interrupt.

0 Likes
1 Solution
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

EZ-Host Kit is obsolete now. But you can download the kit contents from the below path:

https://www.cypress.com/documentation/software-and-drivers/cy3663-cd-rom-image-v10

In that, please refer the following path:

OTG-Host\Source\coprocessor\linux\drivers\usb\cy7c67300\usbd\dedev\de1_bios.asm

In this you can find how the SOF interrupt is handled.

Regards,

Hemanth

Hemanth

View solution in original post

0 Likes
3 Replies
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi,

EZ-Host Kit is obsolete now. But you can download the kit contents from the below path:

https://www.cypress.com/documentation/software-and-drivers/cy3663-cd-rom-image-v10

In that, please refer the following path:

OTG-Host\Source\coprocessor\linux\drivers\usb\cy7c67300\usbd\dedev\de1_bios.asm

In this you can find how the SOF interrupt is handled.

Regards,

Hemanth

Hemanth
0 Likes

Hemanth,

Thank you for your reply.  I will look at the assembly to understand the SOF ISR.

One more question.  In the BIOS User Manual, the description of the HUSB_RESET_INT is below:

3.8.2 HUSB_RESET_INT

3.8.2.1 Software Interface

Entry:

R1: Port number 0=USB-Port0

1=USB-Port1

2=USB-Port2

3=USB-Port3

R0: time interval for USB reset in milliseconds.

Return:

This interrupt returns the speed on that port.

R0: Bit0 = 0 Full speed

Bit0 = 1 Slow speed

Bit1 = 1 No device

Bit1 = 0 Device is connected

Could you please help me understand the port mapping for R1?

On the EZ-HOST (CY7C67300), there are a total of 4 ports (1A,1B,2A,2B), but on the CY7C67200 there are only 2 ports (1A and 2A).

I'm attaching the keyboard to port 2A on the CY7C67200.  Which USB Port number does that correspond to above?

Thanks,

Greg

0 Likes
Hemanth
Moderator
Moderator
Moderator
First like given First question asked 750 replies posted

Hi Greg,

Port 0 would be for port1A

Port 2 would be for port2A

Regards,

Hemanth

Hemanth
0 Likes