Other Parts Discussed in Thread: MSP-TS430PN80USB, MSP430F5529
Dear forum members,
I have a problem with the USB CDC API v1.19 on a MSP-TS430PN80USB with a MSP430F5529. The board is powered from the FET (not from USB). USB is merely used for the connection with a host (Windows PC).
When running any of the CDC examples (included with the CDC API) for the first time, USB enumeration succeeds. However, when I disconnect the USB cable and reconnect the cable after a few seconds (so without power-cycling the board), Windows tells me that the device was not recognized.
I can see the VBUS-ON and VBUS-OFF interrupts arriving on the MSP430, and the corresponding handlers are called correctly. However, I need to power-cycle the board to let the enumeration succeed.
The default (demo) handler for the VBUS-ON event:
BYTE USB_handleVbusOnEvent()
{
//TO DO: You can place your code here
//We switch on USB and connect to the BUS
if (USB_enable() == kUSB_succeed)
{
USB_reset();
USB_connect(); // generate rising edge on DP -> the host enumerates our device as full speed device
}
return TRUE; //return FALSE to go asleep after interrupt (in the case the CPU slept before interrupt)
}
I stepped through the VBUS-ON handler and the first time the handler is called (and enumeration succeeds) the USB_EN bit of the USBCNF register stays set. When this function is called the second time (after disconnect/connect of the USB cable) USB_EN gets set, but resets to 0 after the USB_reset() has been called. However, I cannot pinpoint which code makes the USB_EN bit reset itself.
Has any of you seen similar behavior or can someone explain me why USB enumeration fails after USB disconnect/connect?
