??? 01/17/06 16:24 Read: times |
#107605 - But i think i must do! Responding to: ???'s previous message |
Salaam Joseph,
Joseph said:
I don't think you ever send the device descriptor to the pc host. The firmware does it for you. As I read this, all you need to do is make sure the Device Descriptor Buffer is written during the MCU initialization, before the enumeration process begins. I read the Programming Guide again I did not see a phrase like you has mentioned Read pages 11 and 12 of the programming guide again, following along with the flow chart, and I think you'll see it (assuming that I'm not just completely bumfuddled the way I'm reading it). You are right in the flowchart there isn't any send device descriptor section but i think it must be done in main program,because we have request type,request and kind of packet(data,setup..) these are managed in interrupt routine while in main routine other things like descriptor managing must be handled. during the chip initialization, before the host sends the first device descriptor request. I think it is this buffer (control endpoint) that must be full (paragraph 3, page 11). Dear joe,according to my knowledge(proportional with my english) I think control out endpoint is full when host sends a descriptor,(out is a direction from host to device) after this mcu read control out endpoint to see if this packet is setup or not,if yes then mcu save this buffer to memory after this all operation is done in memory(ram location of mcu) now if device request is valid,mcu send ack to host and check if control type is read(device to host) or write(host to device) and set event according to previous state (read or write) now in main routine the request type,request,and event must be checked for jumping to appropriate section Good luck, and let me know how it works. Thanks,with help of you i hope i win against my problem Mehdi |