Our msp430f5528 based product firmware update functionality has stopped working on Mac OSX El Capitan when device is attached to a hub. My investigation has revealed that re-enumeration of a USB device attached to a USB hub seems to occur twice. The 1st enumeration is successful, then approximately 500 msecs later a USB reset condition is seen followed by several failed setup packet attempts. I am using a Beagle USB 5000 analyzer to capture traces. The failed setup packets do not show ACKs. NOTE: I have a prototype device running on a TPS-TS430PN80USB board. This device works correctly??? (is a f5529 though) I am using GPIO pins to help debug the problem. I set and clear one pin around my usb reset handler and another pin around my setup packet handler. In the failure case I do not see the setup activity pin change after the second reset operation. Under what conditions would a setup packet not be seen?? 0 8279 0:04.035.619 50.000 us 64 B 14 1 OUT txn ....P....`....R..p....R..p.......................… 03 04 05 05 50 1E 08 00 80 60 00 00 00 F0 52 00 00 70 00 00 C0 EC 52 00 00 70 00 00 F7 C9 BA 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0 8283 0:04.035.741 1.929.250 ms 64 B 14 1 IN txn [2 POLL] .....3.....:..\...../.. 0 8289 0:04.051.538 Digital input 0 8290 0:04.038.619 3.003.750 ms 14 1 [4 IN-NAK] 0 8291 0:04.041.642 20.650 us / / 0 8292 0:04.057.101 Digital input 0 8293 0:04.041.663 15.438.550 ms / 0 8294 0:04.057.101 0 8295 0:04.082.520 Digital input 0 8296 0:04.082.525 Digital input 0 8297 0:04.082.111 12.511.882 ms / / 0 8298 0:04.094.623 0 8299 0:04.128.750 Digital input 0 8300 0:04.128.754 Digital input 0 8301 0:04.128.738 31.250 us 0 B 0 0 Set Address Address=06 0 8310 0:04.131.190 Digital input 0 8311 0:04.131.202 Digital input 0 8312 0:04.131.178 68.750 us 8 B 6 0 Get Device Descriptor ........ Index=0 Length=8 12 01 00 02 00 00 00 08 0 8325 0:04.131.386 Digital input 0 8326 0:04.131.397 Digital input 0 8327 0:04.131.373 130.166 us 18 B 6 0 Get Device Descriptor .........'...0.... Index=0 Length=18 12 01 00 02 00 00 00 08 98 27 13 00 05 30 01 02 00 01 0 8348 0:04.131.660 Digital input 0 8349 0:04.131.670 Digital input 0 8350 0:04.131.647 70.666 us 2 B 6 0 Get String Descriptor .. Index=2 Length=2 08 03 0 8363 0:04.131.863 Digital input 0 8364 0:04.131.876 Digital input 0 8365 0:04.131.851 73.250 us 8 B 6 0 Get String Descriptor ..B.S.L. Index=2 Length=8 08 03 42 00 53 00 4C 00 0 8378 0:04.132.049 Digital input 0 8379 0:04.132.058 Digital input 0 8380 0:04.132.036 70.000 us 2 B 6 0 Get String Descriptor .. Index=1 Length=2 06 03 0 8393 0:04.132.250 Digital input 0 8394 0:04.132.262 Digital input 0 8395 0:04.132.238 68.916 us 6 B 6 0 Get String Descriptor ..T.T. Index=1 Length=6 06 03 54 00 54 00 0 8408 0:04.141.734 Digital input 0 8409 0:04.141.746 Digital input 0 8410 0:04.141.722 96.416 us 9 B 6 0 Get Configuration Descriptor ..)...... Index=0 Length=9 09 02 29 00 01 01 00 80 14 0 8427 0:04.141.915 Digital input 0 8428 0:04.141.926 Digital input 0 8429 0:04.141.902 200.084 us 41 B 6 0 Get Configuration Descriptor ..)................!...."......@......@.. Index=0 Length=41 09 02 29 00 01 01 00 80 14 09 04 00 00 02 03 00 00 00 09 21 01 01 00 01 22 1D 00 07 05 81 03 40 00 01 07 05 01 03 40 00 01 0 8462 0:04.144.985 Digital input 0 8463 0:04.144.990 Digital input 0 8464 0:04.144.973 37.334 us 0 B 6 0 Set Configuration Configuration=1 0 8473 0:04.149.216 Digital input 0 8474 0:04.149.227 Digital input 0 8475 0:04.149.203 150.834 us 29 B 6 0 Get Report Descriptor .........)@..&..u..@....)@... Index=0 Length=29 06 00 FF 09 01 A1 01 19 01 29 40 15 00 26 FF 00 75 08 95 40 81 02 19 01 29 40 91 02 C0 0 8500 0:04.527.887 Digital input 0 8501 0:04.527.892 Digital input 0 8502 0:04.151.614 375.986.500 ms 6 1 [377 IN-NAK] 0 8503 0:04.527.882 12.437.366 ms / / 0 8504 0:04.540.320 0 8505 0:04.573.115 10.832 us 8 B I 0 0 SETUP txn ........ 00 05 07 00 00 00 00 00 0 8508 0:04.573.137 10.832 us 8 B I 0 0 SETUP txn ........ 00 05 07 00 00 00 00 00 0 8511 0:04.573.160 10.832 us 8 B I 0 0 SETUP txn ........ 00 05 07 00 00 00 00 00 0 8514 0:05.575.641 Digital input 0 8515 0:05.575.647 Digital input 0 8516 0:05.575.191 12.521.700 ms / / 0 8517 0:05.587.712 0 8518 0:05.632.273 10.834 us 8 B I 0 0 SETUP txn ........ 00 05 11 00 00 00 00 00 0 8521 0:05.632.295 10.834 us 8 B I 0 0 SETUP txn ........ 00 05 11 00 00 00 00 00 0 8524 0:05.632.318 10.834 us 8 B I 0 0 SETUP txn ........ 00 05 11 00 00 00 00 00 0 8527 0:06.634.852 Digital input 0 8528 0:06.634.857 Digital input 0 8529 0:06.634.492 12.513.200 ms / / 0 8530 0:06.647.005 0 8531 0:06.711.019 10.834 us 8 B I 0 0 SETUP txn ........ 00 05 10 00 00 00 00 00 0 8534 0:06.711.042 10.834 us 8 B I 0 0 SETUP txn ........ 00 05 10 00 00 00 00 00 0 8537 0:06.711.064 10.834 us 8 B I 0 0 SETUP txn ........ 00 05 10 00 00 00 00 00 0 8540 0:07.712.950 Digital input 0 8541 0:07.712.956 Digital input 0 8542 0:07.712.601 12.596.550 ms / / 0 8543 0:07.725.197 0 8544 0:07.828.996 10.832 us 8 B I 0 0 SETUP txn ........ 00 05 0C 00 00 00 00 00 0 8547 0:07.829.018 10.832 us 8 B I 0 0 SETUP txn ........ 00 05 0C 00 00 00 00 00 0 8550 0:07.829.041 10.832 us 8 B I 0 0 SETUP txn ........ 00 05 0C 00 00 00 00 00 0 8553 0:08.830.992 Digital input 0 8554 0:08.830.997 Digital input 0 8555 0:08.830.602 12.587.200 ms / / 0 8556 0:08.843.189 0 8557 0:09.025.487 10.834 us 8 B I 0 0 SETUP txn ........ 00 05 14 00 00 00 00 00 0 8560 0:09.025.510 10.834 us 8 B I 0 0 SETUP txn ........ 00 05 14 00 00 00 00 00 0 8563 0:09.025.532 10.834 us 8 B I 0 0 SETUP txn ........ 00 05 14 00 00 00 00 00 0 8566 0:10.028.017 Digital input 0 8567 0:10.028.022 Digital input 0 8568 0:10.027.608 12.573.282 ms / / 0 8569 0:10.040.181 0 8570 0:10.383.532 10.834 us 8 B I 0 0 SETUP txn ........ 00 05 15 00 00 00 00 00 0 8573 0:10.383.554 10.834 us 8 B I 0 0 SETUP txn ........ 00 05 15 00 00 00 00 00 0 8576 0:10.383.577 10.834 us 8 B I 0 0 SETUP txn ........ 00 05 15 00 00 00 00 00 0 8579 0:11.383.603 Capture stopped [11/30/16 13:44:46] /************************************************************************************************** Reset USB-SIE and global variables. ***************************************************************************************************/ static void USB_Reset() { if (app_init_flag != 0xA5) { #if 0 USBCTL = FRSTE; // Function Reset Connection Enable #endif usb_enumerated = false; usb_suspended = false; usb_selected_configuration = 0x00; // device unconfigured usb_selected_interface = 0x00; USBCTL = 0; // Function Reset Connection disable } host_asked_for_more_data_than_available = false; bytes_remaining_on_IEP0 = NO_MORE_DATA; status_action = STATUS_ACTION_NOTHING; USBFUNADR = 0x00; // reset address of USB device (unconfigured) /* Set settings for EP0 */ // NAK both 0 endpoints and enable endpoint 0 interrupt EP0_descriptor_block.bIEPBCNT = NAK; EP0_descriptor_block.bOEPBCNT = NAK; EP0_descriptor_block.bIEPCNFG = UBME | STALL | USBIIE; // 8 byte data packet EP0_descriptor_block.bOEPCNFG = UBME | STALL | USBIIE; // 8 byte data packet USBOEPIE = BIT0 | BIT1; // enable EP0 and EP1 output IRQ USBIEPIE = BIT0 | BIT1; // enable EP0 and EP1 input IRQ /* Set settings for IEP1 */ // enable endpoint 1 interrupt, input IEP_descriptor_block[0].bEPCNF = UBME; // single buffering IEP_descriptor_block[0].bEPBBAX = (unsigned char)(((IEP1_X_BUFFER_ADDRESS - START_OF_USB_BUFFER) >> 3) & 0x00ff); IEP_descriptor_block[0].bEPBCTX = NAK; IEP_descriptor_block[0].bEPBCTY = NAK; IEP_descriptor_block[0].bEPSIZXY = EP_MAX_PACKET_SIZE; /* Set settings for OEP1 */ // enable endpoint 1 interrupt, output #if 0 if (app_init_flag != 0xA5) { OEP_descriptor_block[0].bEPCNF = UBME; } else { OEP_descriptor_block[0].bEPCNF &= ~(DBUF | USBIIE); // no double buffering, no interrupts OEP_descriptor_block[0].bEPCNF |= UBME; } #else OEP_descriptor_block[0].bEPCNF = UBME; #endif OEP_descriptor_block[0].bEPBBAX = (unsigned char)(((OEP1_X_BUFFER_ADDRESS - START_OF_USB_BUFFER) >> 3) & 0x00ff); OEP_descriptor_block[0].bEPBCTX = 0x00; OEP_descriptor_block[0].bEPSIZXY = EP_MAX_PACKET_SIZE; USBCTL = FEN; // enable function USBIFG = 0; // make sure no interrupts are pending #if 0 USBIE = /*SETUPIE |*/ RSTRIE | SUSRIE; // enable USB specific interrupts (setup, reset, suspend) #else USBIFG &= ~RSTRIE; // make sure no interrupts are pending #endif }
↧