This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430 USB DN & DP pins

Other Parts Discussed in Thread: MSP430F5528

Have a customer who wants to use the USB on the MSP430F5528 for firmware upgades (DFU). Otherwise when not performing DFU, he'd like to use the pins as GPIO when not connected to a USB host. Can he switch back-and-forth on the fly? He has a method to detect USB insertion and plans to reprogram the pins to USB pins when USB detection occurs. When the USB connection is removed, he will revert the pins back to GPIO. Can he do this? Or will the DFU firmware cause a problem ?  Thanks - Bill

  • I just recently added USB BSL code to my senior design project. You have an interupt that checks if the USB pins receive USB power, and the reset line is held down (or whatever that S3 reset switch connects on my board, I'll need to look at the schematic).

    So I think you could use those as GPIO, and when the conditions are right to trigger the BSL (immediately plugged into PC), it will enter the BSL routine and take over the USB funcionality.

    If it can't work that way, then you could have a power up delay, where the devices waits a few seconds after powering up before using the USB pins as GPIO. That delay would be enough for the device to go into BSL mode immediately after plugging it into a PC. (or execute the normal program)

    If the device is powered on for a few seconds and it didn't enter BSL mode, then the device can assume it won't and set the pins as GPIO.

    I am pretty sure that would work after messing with the BSL yesturday.

  • Hi William,

    I recommend you insert analog switches to isolate the D+/D- lines from the ports, while the MCU D+/D- ports are assigned for GPIO.

    Please consider on this situation in which the host is power down, but the USB cable is still connected to the device. In such case, the D+/D- lines and host USB port are driven by the MCU or external components, when the ports works as GPIO without analog switch. It is not allowed on USB spec, because it may damage the host port.

    The voltage on VBUS (5V) pin toggles the analog switch with a short delay.
    These analog switches are available for full-speed USB.

    Switching in USB Consumer Applications - Analog Devices
    http://www.analog.com/library/analogDialogue/archives/40-01/usb_switch.html

    ON semiconductor
    http://www.onsemi.com/PowerSolutions/parametrics.do?id=966

    Fairchild
    http://www.fairchildsemi.com/products/switches/pdf/USBGuide_ENG_pgs.pdf

    Maybe, TI also have such an analog switch, but I don't search yet :-)

    Tsuneo

**Attention** This is a public forum