Sign in

username:

password:



Not a member?

Search adsp



Search tips

Subscribe to adsp



adsp by Keywords

AD1819 | AD7332 | ADSP-2106 | ADSP-21060 | ADSP-21065L | ADSP-2116 | ADSP-21160M | ADSP-2181 | ADSP-218x | ADSP-219 | ADSP-2199 | ADSP219 | BF531 | BF532 | BF533 | BF535 | Blackfin | FFT | JTAG | LDF | SDRAM | SHARC | SPORT | UART | VDSP++ | VisualDSP

Discussion Groups

Discussion Groups | Analog Devices DSPs | BF533 / ISP1761 USB Host enumerating problem

Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).

  

Post a new Thread

BF533 / ISP1761 USB Host enumerating problem - robs...@gmail.com - Mar 17 15:09:27 2008



Hello people.

I'm using BlackFin BF533 EZ-Kit with ISP1761 as a USB Host Controller.

I could succesfully enumerate the internal root hub thanks to the documentation from NXP:
AN10037, AN10054.
(BTW, also found out some corrections to AN10037, such as writing HC Status Buffer Register)

Well, I can send and receive tokens to the root hub, set its address and power the ports using
the SetFeature request.

Then, my program keeps polling the hub via GetPortStatus, waiting for my Full-Speed device to
be physically connected to the port.

Once the hub detects it, I got the following:
wPortChange: 0x0001
wPortStatus:   0x0001

After that, the program issues a PORT_RESET and Gets Port Status again:
wPortChange: 0x0011   <-- Port was reset, right?
wPortStatus:   0x0001

(I also assured the port was reset by viewing the 10ms SE0 on the line)

Then, if I GetPorStatus again (one or more times), I get:
wPortChange: 0x0003
wPortStatus:   0x0001

>From the USB 2.0 Spec, I understand this means port was disabled due to an Port_Error
condition.

I have been trying to solve this question for the last week: Why do I get this Port_Error?

I wonder if any of you have already passed through this kind of problem or have any clue about
it.

(Just for testing, I try to talk to the device issuing an GetDeviceDescriptor (at address 0),
but the Setup token's PTD fields return the 'H' and 'X' error flags.)

Thanks in advance.

------------------------------------



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: BF533 / ISP1761 USB Host enumerating problem - robs...@gmail.com - Mar 21 7:39:25 2008


Hello people.
>
>I'm using BlackFin BF533 EZ-Kit with ISP1761 as a USB Host Controller.
>
>I could succesfully enumerate the internal root hub thanks to the documentation from NXP:
AN10037, AN10054.
>(BTW, also found out some corrections to AN10037, such as writing HC Status Buffer
Register)
>
>Well, I can send and receive tokens to the root hub, set its address and power the ports
using the SetFeature request.
>
>Then, my program keeps polling the hub via GetPortStatus, waiting for my Full-Speed device
to be physically connected to the port.
>
>Once the hub detects it, I got the following:
>wPortChange: 0x0001
>wPortStatus:   0x0001
>
>After that, the program issues a PORT_RESET and Gets Port Status again:
>wPortChange: 0x0011     From the USB 2.0 Spec, I understand this means port was disabled
due to an Port_Error condition.
>
>I have been trying to solve this question for the last week: Why do I get this Port_Error?
>
>I wonder if any of you have already passed through this kind of problem or have any clue
about it.
>
>(Just for testing, I try to talk to the device issuing an GetDeviceDescriptor (at address
0), but the Setup token's PTD fields return the 'H' and 'X' error flags.)
>
>Thanks in advance.
>
>------------------------------------

(Updating the thread...)

This week I discovered some things. 

The words of the GetPortStatus were not being interpreted correctly. Endianess problems and
misinterpreted casts from compiler. 

Well, now I can enumerate the internal hub and see the PortStatus flowing as it should be.
Below is the dump from my program:
	GetDeviceDescriptor: address:0 | size:8
	GetDeviceDescriptor: address:2 | size:18
	SetFeature PORT_POWER on port 1
	SetFeature PORT_POWER on port 2
	SetFeature PORT_POWER on port 3
    	GetConfigurationDescriptor address:2 
	SetConfiguration 0x1 address:2
	
	GetPortStatus: wPortChange[0001] wPortStatus[0101] (Now it is represented correctly)
	
	ClearFeature C_PORT_CONNECTION on port 2
	SetFeature PORT_RESET on port 2
	GetPortStatus: wPortChange[0010] wPortStatus[0103] 
	
	ClearFeature C_PORT_RESET on port 2
	GetPortStatus: wPortChange[0000] wPortStatus[0103] <== GOOD! but...
	
	GetDeviceDescriptor: address:0 | size:8
	PTD Error: DW3: 5240_0000 => DW1 data: Token:SETUP | EPType:CONTROL | Addr:0 | Endp:0  
	GetDeviceDescriptor failed
	
	PTD Error: DW3: 5240_0000 => DW1 data: Token:SETUP | EPType:CONTROL | Addr:0 | Endp:0
	SetAddress(3) failed
	
	GetDeviceDescriptor: address:3 | size:18
	PTD Error: DW3: 5240_0000 => DW1 data: Token:SETUP | EPType:CONTROL | Addr:3 | Endp:0
	GetDeviceDescriptor failed

The port gets powered, the hub sees a device at port 2, the port is succesfully reset and
enabled, but when I issue a GetDeviceDescriptor or SetAddress, the PTD area returns (H)Halt and
X(Transaction error).

What could be missing between the Clear C_PORT_RESET and GetDeviceDescriptor to get the device
receiving and answering it?

I'm using an Full-Speed device.

Thanks for the help. 
------------------------------------



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )