The problem is that about 10% of the time the event does not fire when the device is connected. I thought it might be the device, but it appears that others exhibit the same behavior. Further, if I connect the device to a PC I do not see any “missed” connections.
What might cause the USBizi to “miss” the interrupt about 10% of the time?
Device is powered with its own PSU. Domino is powered with regulated 5V with 3A capacity. I put some large caps in there just in case a voltage drop was the issue, but that has not helped.
Let me know if you have any suggestions where to look.
The code was straight from the EBook. I even isolated it futher by just doing the minimum declarations to just look at the DeviceConnectedEvent.
I’ll look at a possible surge by attaching a powerpack to the Domino rather than using the 5VIN, but I’m not sure I see how a surge would be coming from the 5V into the domino when I connect a USB device. I would have expected the opposite.
Make a new project that ONLY has three events and see the results:
DeviceConnect()
{
debug.printf(“Connected”);
}
DeviceDisconnect()
{
debug.printf(“Disconnected”);
}
DeviceBad()
{
debug.printf(“Bad”);
}
Ok, so I somehow missed the DeviceBadConnectionEvent event in the documentation. Now that I implemented it I see it is triggering a bad connection event about 10% of the time.
So, the next question is how can I dig into the reason the bad connection event is fired and how can I forced a reconnect without having to physically remove and replace the plug or toggle the power to the USB device?
This happens with other USB devices too besides this one and it does not appear to happen when connecting them to an ordinary PC.
To the Domino or the Device? I have a scope on the USB power and the connection process has no effect. Is it a power issue to the USBizi chip? Where would I be able to see the power issue so I can address it?
Well, I’m gonna cheat by trapping a bad connection event and triggering a reset circuit on the USB device. I tried large caps on the 5V power, a PSU on the 7-12VIN, different cables, different devices, but it continues to have intermittant issues connecting to USB devices.