Other Parts Discussed in Thread: MSP430F6659
My project uses the TI USB API in an HID configuration. The project accepts power from the USB, a DC source, or both ("OR"ed). In the event that both powers are applied, the USB controls a MOSFET which blocks the DC power source (to prevent unnecessary battery drain). As a result, the instrument runs on USB power. If USB power is removed for any reason, the instrument immediately switches to DC power. A 100µF cap is used on the "OR"ed source power input to filter the supply and to try to keep the device operational during the transition. The power output of the DC/USB source (+POWER) is used to power a 3.3V switching regulator circuit with a drop out voltage of 2.2VDC on the input.
Problem: When the project is connected to the PC via a USB cable, plugging another device into any USB port on my PC can possibly cause my device to lock-up.
My first step was to try to debug the issue at the firmware level. I was unable to load the debugger due to lack of memory. As a result, I upgraded the device processor to an MSP430F6659 to increase my memory space so I could troubleshoot the issue. With the new upgrade, I loaded the debugger and continually plugged a device into one of my PC USB slots until the project locked up. Breaking the program, the break address would either be the starting vector (in my case 0x008004 which is the address stored in 0x00FFFE) or a random unused address (something like 0x01E104 which contains the code jmp 0x01E104). I inspected SYSRSTIV and it indicated that the last reset was due to a brown-out condition.
Now, thinking that it may be a hardware issue, I removed the DC control MOSFET (Q1) from the DC power circuit and installed a jumper between the source and drain. As a result, the project will run on USB when no DC power source is connected or when the USB voltage is higher than the DC power source. I set the DC power source voltage to 6V so the USB voltage should not be an issue. I continually plugged and unplugged the USB cable connected to the project and monitored the power at +POWER and saw no issues.
Finally, I connected the project to the PC USB. With the project DC voltage set to 6V, I began plugging and unplugging an unrelated USB cable into the PC on a different USB port until my project locked up again. Breaking the program, the SYSRSTIV indicated a brown-out condition.
Question: Does anyone else have any other troubleshooting ideas? Could it be related to an improperly handled USB issue like suspend?