On May 22, 2012, at 21:09 , Liviu Ionescu wrote: > I did a usb sniff compare between version 4.42c and 4.46f, using exactly the > same device; the program sniffed was JLink.exe.
after a visual diff on the (intensly sed processed) logs, I cannot identify any major changes in the protocol. the differences are minor, for example the new version always reads the voltage with 7 millivolts lower than the old version. another difference is that 2 EMU_CMD_HW_JTAG3 commands like out 16 00000000 CF 00 30 00 01 00 00 00 C0 00 10 04 FC 03 38 00 now return in 7 00000000 57 00 40 40 80 FF 00 instead of in 7 00000000 57 00 40 C0 80 FF 00 (the 4th byte has the msb 0 instead of 1) also different is the content of the undocumented 0x09 request, that I currently do not understand. what finally happens with the new version is that at a certain point the keep_alive() is not invoked soon enough, and later the communication loss the sync. it looks like the new firmware reacts differently in time, and our code is time critical. I first thought that the problem is only Mac related, but did the test on Ubuntu amd the behaviour was similar. I'm trying to better understand the driver, and why the keep_alive() is not called in time. Liviu Debug: 280 1259 jlink.c:591 jlink_simple_command(): 0x07 Debug: 281 1260 jlink.c:1516 jlink_usb_write(): jlink_usb_write, out_length = 1, result = 1 Debug: 282 1260 jlink.c:1563 jlink_debug_buffer(): 0000 07 libusb:info [darwin_async_io_callback] an async io operation has completed libusb:info [op_handle_events] checking fd 6 with revents = 0 libusb:info [op_handle_events] checking fd 8 with revents = 1 libusb:info [darwin_handle_callback] handling bulk completion with kernel status 0 Debug: 283 1260 jlink.c:1528 jlink_usb_read(): jlink_usb_read, result = 8 Debug: 284 1260 jlink.c:1563 jlink_debug_buffer(): 0000 d7 0c 01 01 01 01 00 01 Info : 285 1260 jlink.c:616 jlink_get_status(): Vref = 3.287 TCK = 1 TDI = 1 TDO = 1 TMS = 1 SRST = 0 TRST = 1 Info : 286 1260 jlink.c:443 jlink_init(): J-Link JTAG Interface ready Debug: 287 1260 jlink.c:571 jlink_reset(): trst: 0, srst: 0 Debug: 288 1260 jlink.c:591 jlink_simple_command(): 0xdd Debug: 289 1260 jlink.c:1516 jlink_usb_write(): jlink_usb_write, out_length = 1, result = 1 Debug: 290 1260 jlink.c:1563 jlink_debug_buffer(): 0000 dd Debug: 291 1260 jlink.c:591 jlink_simple_command(): 0xdf Debug: 292 1260 jlink.c:1516 jlink_usb_write(): jlink_usb_write, out_length = 1, result = 1 Debug: 293 1260 jlink.c:1563 jlink_debug_buffer(): 0000 df libusb:info [ep_to_pipeRef] converting ep address 0x02 to pipeRef and interface libusb:info [ep_to_pipeRef] pipe 2 on interface 0 matches libusb:info [darwin_async_io_callback] an async io operation has completed libusb:info [op_handle_events] checking fd 6 with revents = 0 libusb:info [op_handle_events] checking fd 8 with revents = 1 libusb:info [darwin_handle_callback] handling bulk completion with kernel status 0 libusb:info [ep_to_pipeRef] converting ep address 0x81 to pipeRef and interface libusb:info [ep_to_pipeRef] pipe 1 on interface 0 matches Debug: 294 1264 log.c:422 keep_alive(): keep_alive() was not invoked in the 1000ms timelimit (1264). This may cause trouble with GDB connections. Debug: 296 1264 interface.c:406 jtag_debug_state_machine(): TAP/SM: START state: RESET Debug: 297 1264 interface.c:412 jtag_debug_state_machine(): TAP/SM: TMS bits: 8 (bytes: 1) Debug: 298 1264 interface.c:454 jtag_debug_state_machine(): TAP/SM: RESET -> RESET TMS: 11111111 TDI: 00000000 Debug: 299 1264 interface.c:457 jtag_debug_state_machine(): TAP/SM: FINAL state: RESET Debug: 300 1264 jlink.c:1516 jlink_usb_write(): jlink_usb_write, out_length = 6, result = 6 Debug: 301 1264 jlink.c:1563 jlink_debug_buffer(): 0000 cf 00 08 00 ff 00 libusb:info [darwin_async_io_callback] an async io operation has completed libusb:info [op_handle_events] checking fd 6 with revents = 0 libusb:info [op_handle_events] checking fd 8 with revents = 1 libusb:info [darwin_handle_callback] handling bulk completion with kernel status -536870168 libusb:info [ep_to_pipeRef] converting ep address 0x02 to pipeRef and interface libusb:info [ep_to_pipeRef] pipe 2 on interface 0 matches libusb:info [darwin_async_io_callback] an async io operation has completed libusb:info [op_handle_events] checking fd 6 with revents = 0 libusb:info [op_handle_events] checking fd 8 with revents = 1 libusb:info [darwin_handle_callback] handling bulk completion with kernel status 0 libusb:info [ep_to_pipeRef] converting ep address 0x02 to pipeRef and interface libusb:info [ep_to_pipeRef] pipe 2 on interface 0 matches libusb:error [darwin_transfer_status] transfer error: data overrun Debug: 302 1266 jlink.c:1528 jlink_usb_read(): jlink_usb_read, result = 0 Error: 303 1266 jlink.c:1423 jlink_usb_message(): usb_bulk_read failed (requested=1, result=0) Error: 304 1266 jlink.c:1306 jlink_tap_execute(): jlink_tap_execute, wrong result -107 (expected 1) ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
