SilverLink_Paper.txt 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. +------------------------------------------+
  2. | TI-GRAPH LINK USB cable (aka SilverLink) |
  3. | Informations |
  4. +------------------------------------------+
  5. Link cable characteristics:
  6. ---------------------------
  7. - Name: 'TI-GRAPH LINK USB'
  8. - Manufacturer: 'Texas Instruments Corporated'
  9. - VID/PID: 0x0451/0xe001
  10. - Firmware revision: 1.03
  11. - Internal µC: CY7C64013 (Cypress Semiconductors)
  12. USB related things:
  13. -------------------
  14. The cable is a full-speed (FS, 12Mbit/s) device, USB1.1 compliant, under a
  15. proprietary class. It does not fit into any existing class (HID, printer, ...)
  16. then it requires a specific device driver.
  17. The device uses 'Bulk' mode for data transfers. There are two bulk endpoints
  18. (IN & OUT) and one control endpoint (mandatory). Transfers are achieved by
  19. packets. The endpoints advertise a maximum packet size of 32 bytes but data
  20. are usually transfered as 256-bytes chunks (URBs) by TI-Connect.
  21. Ti-Connect behaviour:
  22. ---------------------
  23. The TI-Connect software systematically do the following sequence:
  24. - reset both pipes (IN & OUT),
  25. - try to read 1024 bytes (probably for flushing IN pipe),
  26. - reset the pipes again (URB_FUNCTION_RESET_PIPE)
  27. before transfering anything.
  28. This information was got by sniffing with UsbSnoopy/SniffUSB.
  29. The TI's driver does not use Power Management.
  30. Link cable and/or driver behaviour:
  31. -----------------------------------
  32. This section aims to give some importants informations. Without them, the driver will
  33. be working badly and/or poorly. This cable has a specific behaviour which appeared to be the
  34. same on both Linux & Windows.
  35. Although the maximum packet size is 32 bytes, you can not read/write bytes as you want.
  36. 1°) reset: it's better to close and reopen driver after each transfer or
  37. resets both pipes before each transfer (see TI-Connect behaviour).
  38. 2°) read: you have to systematically read an 32-bytes block even if you know that you
  39. just need to get 4 bytes. A shorter read will lost the other bytes.
  40. => solution: bufferize reading by getting a 32 byte block and processing it.
  41. 3°) quirk: the read (Linux) or the ReadFile (Win32) function can sometimes returns with
  42. neither data nor error. This quirk randomly appears in transfers but almost occurs
  43. when getting the TI89 ID-LIST. A guy told me it was specific to Cypress devices.
  44. => solution: retry a read/ReadFile access.
  45. [ 4°) write: you can send how many bytes you want: from 1 to 32 bytes.
  46. Theoritically, it is better to send a block of bytes rather than byte per
  47. byte. This is less CPU consuming for USB layers & OS.
  48. Practically, transfers are more reliable if we send byte per byte because the
  49. calc have enough time for replying. But, the transfer rate decreases significantly
  50. (1KB/s instead of 5KB/s when sending FLASH app/os).
  51. Using full transfer triggers some transfer interruptions.
  52. => solution: bufferize writing by sending block at once if it's full and sending it byte per byte
  53. when the block is incomplete. Exception: if this block is the last one of a transfer
  54. (just before switching in receive mode), send it byte per byte. ] -> not true any longer
  55. By following these 4 rules, I got good drivers for both Linux & Windows.
  56. Identity card (Linux log):
  57. --------------------------
  58. Manufacturer: Texas Instruments Incorporated
  59. Product: TI-GRAPH LINK USB
  60. usb.c: unhandled interfaces on device
  61. usb.c: USB device 2 (vend/prod 0x451/0xe001) is not claimed by any active driver.
  62. Length = 18
  63. DescriptorType = 01
  64. USB version = 1.10
  65. Vendor:Product = 0451:e001
  66. MaxPacketSize0 = 8
  67. NumConfigurations = 1
  68. Device version = 1.03
  69. Device Class:SubClass:Protocol = 00:00:00
  70. Per-interface classes
  71. Configuration:
  72. bLength = 9
  73. bDescriptorType = 02
  74. wTotalLength = 0020
  75. bNumInterfaces = 01
  76. bConfigurationValue = 01
  77. iConfiguration = 00
  78. bmAttributes = a0
  79. MaxPower = 100mA
  80. Interface: 0
  81. Alternate Setting: 0
  82. bLength = 9
  83. bDescriptorType = 04
  84. bInterfaceNumber = 00
  85. bAlternateSetting = 00
  86. bNumEndpoints = 02
  87. bInterface Class:SubClass:Protocol = ff:00:00
  88. iInterface = 00
  89. Endpoint:
  90. bLength = 7
  91. bDescriptorType = 05
  92. bEndpointAddress = 81 (in)
  93. bmAttributes = 02 (Bulk)
  94. wMaxPacketSize = 0020
  95. bInterval = 00
  96. Endpoint:
  97. bLength = 7
  98. bDescriptorType = 05
  99. bEndpointAddress = 02 (out)
  100. bmAttributes = 02 (Bulk)
  101. wMaxPacketSize = 0020
  102. bInterval = 00
  103. Author:
  104. -------
  105. (C) Romain Liévin, developer of TiLP & TiEmu.
  106. July the 23th, 2005