1 / 27

Commando : Get descriptor (¿Quien sos?)

Sync. SOF. Frame#. CRC5. EOP. USB. 00000001. 0x A5. 0x0DD. 0x15. 001. Sync. DATA0. Sync. DATA. ACK. EOP. CRC16. EOP. Sync. SETUP. ADDR. ENDP. CRC5. EOP. 00000001. 0x C3. 00000001. 80 06 00 01 00 00 40 00. 0x 4B. 001. 0xBB29. 001. 00000001. 0x B4. 0x00. 0x0.

Télécharger la présentation

Commando : Get descriptor (¿Quien sos?)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x0DD 0x15 001 Sync DATA0 Sync DATA ACK EOP CRC16 EOP Sync SETUP ADDR ENDP CRC5 EOP 00000001 0xC3 00000001 80 06 00 01 00 00 40 00 0x4B 001 0xBB29 001 00000001 0xB4 0x00 0x0 0x08 001 Device Commando: Get descriptor(¿Quien sos?) Setup stage PC

  2. Sync Sync SOF SOF Frame# Frame# CRC5 CRC5 EOP EOP USB 00000001 00000001 0xA5 0xA5 0x0DD 0x0DD 0x15 0x15 001 001 Sync DATA0 Sync DATA ACK EOP CRC16 EOP Sync SETUP ADDR ENDP CRC5 EOP 00000001 0xC3 00000001 80 06 00 01 00 00 40 00 0x4B 001 0xBB29 001 00000001 0xB4 0x00 0x0 0x08 001 Device End of Packet (D+ and D- bajas) 5 bit Checksum sobre Frame# Nro. de Frame (0 - 2047) cíclico Start of Frame (uno por milisegundo) Packet start indica “llegando paquete” al transceiver Start Of Frame...se genera cada 1 mseg Setup stage PC

  3. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x0DD 0x15 001 Sync DATA0 Sync DATA ACK EOP CRC16 EOP Sync Sync SETUP SETUP ADDR ADDR ENDP ENDP CRC5 CRC5 EOP EOP 00000001 0xC3 00000001 80 06 00 01 00 00 40 00 0x4B 001 0xBB29 001 00000001 00000001 0xB4 0xB4 0x00 0x00 0x0 0x0 0x08 0x08 001 001 Device Endpoint 0 (usado para configuración) Address 0 (def. addr. Para cada nuevo disp. attachado) Setup Packet (comienza transf. de control) Se decodifican los Paquetes Setup completos y se generan las interrupciones Setup stage PC

  4. USB Sync Sync DATA0 DATA0 Sync DATA DATA ACK EOP CRC16 CRC16 EOP EOP Sync SETUP ADDR ENDP CRC5 EOP 00000001 00000001 0xC3 0xC3 00000001 80 06 00 01 00 00 40 00 80 06 00 01 00 00 40 00 0x4B 001 0xBB29 0xBB29 001 001 00000001 0xB4 0x00 0x0 0x08 001 DATA Device Get device descriptor genera una interrupción Get device descriptor genera una interrupción El Paquete Data define que clase de transferencia setup se inicia. Setup stage PC 80 = dirección de transfer, comando std. 06 = get descriptor 00 = índice del descriptor 01 = device descriptor 00 00 = language ID 40 00 = cantidad de bytes requeridos por el host (formato little endian; Lowbyte, Highbyte)

  5. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x0DD 0x15 001 Sync DATA0 Sync DATA ACK EOP CRC16 EOP Sync SETUP ADDR ENDP CRC5 EOP 00000001 0xC3 00000001 80 06 00 01 00 00 40 00 0x4B 001 0xBB29 001 00000001 0xB4 0x00 0x0 0x08 001 Device Acknowledge Packet Cada transferencia de control debe ser reconocida (ACKnowledged) Setup stage PC

  6. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x0DE 0x17 001 Sync DATA1 Sync DATA ACK EOP CRC16 EOP Sync ADDR ENDP CRC5 EOP 00000001 0xD2 00000001 12 01 00 01 00 00 00 08 0x4B 001 0xC8E7 001 00000001 0x00 0x0 IN 0x8 001 Device 0x96 Data In Packet (Host requiere datos del dispositivo) Cada transferencia de Datos será iniciada por el host (PC) con un Paquete IN/OUT Data stage PC

  7. USB Sync Sync DATA1 DATA1 Sync DATA DATA ACK EOP CRC16 CRC16 EOP EOP Sync IN ADDR ENDP CRC5 EOP 00000001 00000001 0xD2 0xD2 00000001 12 01 00 01 00 00 00 08 12 01 00 01 00 00 00 08 0x4B 001 0xC8E7 0xC8E7 001 001 00000001 0x96 0x00 0x0 0x8 001 DATA Device 00 = byte bajo de especificación USB } 1eros. 8 bytes del device descriptor V 01.00 01 = byte alto de especificación USB 00 = Device Class 00 = Device Protocol 00 = Device Sub Class 08 = Tamaño Max. de paquete del endpoint 0 Paquetes de Datos Data stage PC 12 = longitud del device descriptor 01 = Tipo de device descriptor

  8. Paquete Data Out (El Host aborta la etapa de datos) Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x0E0 0x0E 001 Sync DATA1 Sync DATA ACK EOP CRC16 EOP Sync ADDR ENDP CRC5 EOP 00000001 0xD2 00000001 0x4B 001 0x0000 001 00000001 0x00 0x0 0x08 001 Device OUT 0x87 Paquete de datos vacío indica fin de la etapa de datos Fin de la Etapa de Datos Data stage  Status stage PC

  9. USB RESET Device 128160 Reset iniciado por el host Reset desde el Host (10ms) PC

  10. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x143 0x04 001 Sync DATA0 Sync DATA ACK EOP CRC16 EOP Sync SETUP ADDR ENDP CRC5 EOP 00000001 0xC3 00000001 00 05 02 00 00 00 00 00 0x4B 001 0xD768 001 00000001 0xB4 0x00 0x0 0x08 001 Device DATA Commando: Set Address (Desde ahora te llamás Nº2) PC 00 = dirección host- dispositivo, std. command, receptor el dispositivo 05 = set address 02 = device address nr. 2 00 00 00 00 00 = default

  11. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x144 0x08 001 Sync DATA1 Sync DATA ACK EOP CRC16 EOP Sync ADDR ENDP CRC5 EOP 00000001 0xD2 00000001 0x4B 001 0x0000 001 00000001 0x00 0x0 0x08 001 Device IN 0x96 Paquete de datos vacío desde el dispositivo. Fin de la etapa de Datos Data stage  Status stage PC

  12. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x151 0x1E 001 Sync DATA0 Sync DATA ACK EOP CRC16 EOP Sync SETUP ADDR ENDP CRC5 EOP 00000001 0xC3 00000001 80 06 00 01 00 00 12 00 0x4B 001 0x072F 001 00000001 0xB4 0x02 0x0 0x15 001 Device El dispositivo es accedido como Nº2 Get Descriptor del Dispositivo Nº 2(¿Que sos?) Setup stage PC

  13. DATA 80 06 00 01 00 00 12 00 Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x151 0x1E 001 Sync Sync DATA0 DATA0 Sync DATA ACK EOP CRC16 CRC16 EOP EOP Sync SETUP ADDR ENDP CRC5 EOP 00000001 00000001 0xC3 0xC3 00000001 80 06 00 01 00 00 12 00 0x4B 001 0x072F 0x072F 001 001 00000001 0xB4 0x02 0x0 0x15 001 DATA Device Get Descriptor del Dispositivo Nº 2(¿Que sos?), detalles Setup stage PC 80 = dirección de transferencia, std. command 06 = get descriptor 00 = índice del descriptor 01 = device descriptor 00 00 = language ID 12 00 = bytes a transferir

  14. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x152 0x1C 001 Sync DATA1 Sync DATA ACK EOP CRC16 EOP Sync ADDR ENDP CRC5 EOP 00000001 0xD2 00000001 12 01 00 01 00 00 00 08 0x4B 001 0xC8E7 001 00000001 0x02 0x0 IN 0x15 001 Device 0x96 IN request(obtiene datos del dispositivo) Data stage PC

  15. USB Sync Sync DATA1 DATA1 Sync DATA DATA ACK EOP CRC16 CRC16 EOP EOP Sync IN ADDR ENDP CRC5 EOP 00000001 00000001 0xD2 0xD2 00000001 12 01 00 01 00 00 00 08 12 01 00 01 00 00 00 08 0x4B 001 0xC8E7 0xC8E7 001 001 00000001 0x96 0x02 0x0 0x15 001 DATA Device 00 = byte bajo de la especificación USB 1eros. 8 bytes del device descriptor 01 = byte alto dela especificación USB 00 = Device Class 00 = Device Sub Class 00 = Device Protocol 08 = Tamaño Max. De paquete del endpoint 0 IN request, detalles(get data about device description) Data stage PC 12 = longitud del device descriptor 01 = Tipo device descriptor

  16. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x153 0x03 001 Sync DATA0 Sync DATA ACK EOP CRC16 EOP Sync ADDR ENDP CRC5 EOP 00000001 0xC3 00000001 8B 05 41 C5 01 00 00 00 0x4B 001 0x86DB 001 00000001 0x02 0x0 IN 0x15 001 Device 0x96 2º IN request(obtiene datos del dispositivo) Data stage PC

  17. USB Sync Sync DATA0 DATA0 Sync DATA DATA ACK EOP CRC16 CRC16 EOP EOP Sync IN ADDR ENDP CRC5 EOP 00000001 00000001 0xC3 0xC3 00000001 8B 05 41 C5 01 00 00 00 8B 05 41 C5 01 00 00 00 0x4B 001 0x86DB 0x86DB 001 001 00000001 0x96 0x02 0x0 0x15 001 DATA Device 8B = byte bajo del vendor ID 05 = byte alto del vendor ID 41 = byte bajo del product ID siguientes 8 bytes del device descriptor C5 = byte alto del product ID 2º IN request, detallesSe transfieren los datos específicos a la PC PC 01 = byte bajo del devicenumber 00 = byte alto del devicenumber 00 = índice para string descriptor del fabricante 00 = índice al string descriptor del producto

  18. Sync Sync SOF SOF Frame# Frame# CRC5 CRC5 EOP EOP USB 00000001 00000001 0xA5 0xA5 0x154 0x154 0x1D 0x1D 001 001 Sync Sync DATA1 DATA1 Sync DATA DATA ACK EOP CRC16 CRC16 EOP EOP Sync Sync ADDR ADDR ENDP ENDP CRC5 CRC5 EOP EOP 00000001 00000001 0xD2 0xD2 00000001 00 01 00 01 0x4B 001 0xFCF1 0xFCF1 001 001 00000001 00000001 0x02 0x02 0x0 0x0 0x15 0x15 001 001 Device IN IN 0x96 0x96 DATA 3º IN requestSe transfiere el resto Data stage PC 00 = índice al string descriptor del número de serie 01 = número de configuraciones

  19. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x155 0x02 001 Sync DATA1 Sync DATA ACK EOP CRC16 EOP Sync ADDR ENDP CRC5 EOP 00000001 0xD2 00000001 0x4B 001 0x0000 001 00000001 0x02 0x0 0x15 001 Device OUT 0x87 Commando: OUT transfer (paquete de datos vacío) finaliza la etapa de datos Data stage  Status stage PC

  20. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x157 0x1F 001 Sync DATA0 Sync DATA ACK EOP CRC16 EOP Sync SETUP ADDR ENDP CRC5 EOP 00000001 0xC3 00000001 80 06 00 02 00 00 FF 00 0x4B 001 0x9725 001 00000001 0xB4 0x02 0x0 0x15 001 Device Command: Get Configuration Descriptor(¿Como funciona el dispositivo?) Setup stage PC

  21. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x157 0x1F 001 Sync Sync DATA0 DATA0 Sync DATA DATA ACK EOP CRC16 CRC16 EOP EOP Sync SETUP ADDR ENDP CRC5 EOP 00000001 00000001 0xC3 0xC3 00000001 80 06 00 02 00 00 FF 00 80 06 00 02 00 00 FF 00 0x4B 001 0x9725 0x9725 001 001 00000001 0xB4 0x02 0x0 0x15 001 DATA Device 00 00 = language ID FF = byte bajo de los bytes a transferir 00 = byte alto de los bytes a transferir Commando: Get Configuration Descriptor(¿Como funciona el dispositivo?), detalles PC 80 = dirección de transferencia, std. command 06 = get descriptor 00 = índice del descriptor 02 = configuration descriptor

  22. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x158 0x0F 001 Sync DATA1 Sync DATA ACK EOP CRC16 EOP Sync ADDR ENDP CRC5 EOP 00000001 0xD2 00000001 09 02 19 00 01 01 00 60 0x4B 001 0x5020 001 00000001 0x02 0x0 IN 0x15 001 Device 0x96 In Request: Respuesta a ¿Como funciona el dispositivo? Data stage PC

  23. USB Sync Sync DATA1 DATA1 Sync DATA DATA ACK EOP CRC16 CRC16 EOP EOP Sync IN ADDR ENDP CRC5 EOP 00000001 00000001 0xD2 0xD2 00000001 09 02 19 00 01 01 00 60 09 02 19 00 01 01 00 60 0x4B 001 0x5020 0x5020 001 001 DATA 00000001 0x96 0x02 0x0 0x15 001 Device 1eros. 8 bytes del device descriptor In Request: Respuesta a ¿Como funciona el dispositivo?, detalles PC 09 = longitud del configuration descriptor 02 = Tipo del configuration descriptor 19 00 = longitud de los configuration, interface y endpoint descriptors 01 = nro. de interfaces usadas en esta configuración 01 = valor para esta configuración con SetConfiguration 00 = índice al configuration string descriptor 60 = atributos de la configuration

  24. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x159 0x10 001 Sync DATA0 Sync DATA ACK EOP CRC16 EOP Sync ADDR ENDP CRC5 EOP 00000001 0xC3 00000001 32 09 04 00 00 01 00 00 0x4B 001 0x273E 001 00000001 0x02 0x0 IN 0x15 001 Device 0x96 2ºIn Request: Respuesta a ¿Como funciona el dispositivo? Data stage PC

  25. USB Sync Sync DATA0 DATA0 Sync DATA DATA ACK EOP CRC16 CRC16 EOP EOP Sync IN ADDR ENDP CRC5 EOP 00000001 00000001 0xC3 0xC3 00000001 32 09 04 00 00 01 00 00 32 09 04 00 00 01 00 00 0x4B 001 0x273E 0x273E 001 001 DATA 00000001 0x96 0x02 0x0 0x15 001 Device Siguientes 8 bytes del device descriptor 2ºIn Request: Respuesta a ¿Como funciona el dispositivo?, detalles PC 32 = Consumo max.de energía (en unidades de 2mA) 09 = longitud del interface descriptor 04 = Tipo de interface descriptor 00 = número de interfaces 00 = seteos alternativos 01 = endpoints utilizados enesta interfaz 00 = interface class 00 = interface sub class

  26. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x15B 0x0D 001 Sync DATA0 Sync DATA ACK EOP CRC16 EOP Sync ADDR ENDP CRC5 EOP 00000001 0xC3 00000001 00 0x4B 001 0x0000 001 00000001 0x02 0x0 0x15 001 Device IN 0x96 00 = intervalo de polling para interrupt endpoints 3ºIn Request: Respuesta a ¿Como funciona el dispositivo?, detalles PC

  27. Sync SOF Frame# CRC5 EOP USB 00000001 0xA5 0x15C 0x15 001 Sync DATA1 Sync DATA ACK EOP CRC16 EOP Sync ADDR ENDP CRC5 EOP 00000001 0xD2 00000001 0x4B 001 0x0000 001 00000001 0x02 0x0 0x15 001 Device OUT 0x87 Commando: transferencia OUT finaliza la etapa de datos Data stage  Status stage PC

More Related