USB enumeration problem
I am trying to write usb enumeration routines. My program has errors. But where I don't know.
1) PC, the command sends GetDeviceDescriptor. (80 06 00 01 00 00 40 00) Hex
- The software sends DeviceDesriptor.
2) The reset signal coming from the PC
3) PC sends the command SetAddress (00 05 02 00 00 00 00 00)
- I read and I set the address. (Address is 2)
These processes take place two more times.
And PC gives an error message "USB Device Not Recognized"
My DeviceDescriptor data {18, 0x01, 0x10, 0x01, 0xFF, 0xFF,0xFF, 0x08, 0x47, 0x05, 0x31, 0x21, 0x21, 0x00, 0x01, 0x02, 0x03,0x01}
How can I find the problem?
My DeviceDescriptor can go wrong in PC
How can I check it?
Re: USB enumeration problem
My usb device receive following setup command.
This is may be Get Descriptor by first byte is 0x81 and i dont know.
What is it?
81 06 00 22 00 00 5D 00.."..].
Recipient: Interface
Request Type: Standard
Direction: Device->Host
Request: 0x6 (GET_DESCRIPTOR)
Value: 0x2200
Index: 0x0
Length: 0x5d
Hi.
Hope you can clear my doubt in USB enumeration problem. I am using PIC24FJ256DA206 microcontroller as Host and USB mouse as Device. After successfully reading Device Descriptor from usb mouse, i establish Set_Address command what you have mentioned above. I even could get acknowledgement from Device side. After this step, i perform a simple IN transaction(No Data Stage) as Status Stage. I can get ACK for this Status stage also.
Then, i update my U1ADDR register of host with new address what i set for Mouse. Then, i transmit my Get_Configuration command which end up with Time Out Flag set.
This is the Get_Configuration command i send to USB mouse.
volatile unsigned char Get_Config[]={0x80,0x80,0x00,0x00,0x00,0x00,0x01,0x00};
Please help me to over come this problem.
1. I'm configure the GPIO pin what they mention in the datasheet.
2. configure the mentioned timer here TIM2 in capture mode with 1khz for 1 ms frame period for FS & configured the mentioned OTG FS SOF bit in the timer registers.
3.Enabled the SOFOUT bit.
and then I'm observing the SOF signal for at the mentioned GPIO, but nothing is showing i don't understand the problem.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?