3
\$\begingroup\$

I've have a system consisting of a Raspberry Pi Zero W, a usb2422 USB-hub, a CP2108 Uart-to-USB converter as well as another USB device (lets call it device 2, it doesn't matter which one I plug in).

Starting the circuit up, i have access to device 2, but not to the CP2108. In the dmesg kernel output of the raspberry I can't find any errors. It just does not recognize the CP2108.

After some debugging, I found it working. Following scheme is reproducable 100% (tried it about 10 times);

I found it working if I turn off power to the circuit and then turning it on again. After tuning it off, the 5V supply voltage of the Pi (where the 3V get generated from a switching converter at Pi) drops down to 1V immediately, then slowly further. If I turn the power on again before beeing lower than 20mV, the all devices work.

Following information gathered during debugging:

The CP2108 has a reset pin. When i have no access, resetting the device via this feature has no effect. I do not see any log of this event in the dmesg output. However, it disables the pullup on the data line, as it is supposed to do, as long as the reset is pulled. When I have access to the device (measured quarz Voltage at startup), a reset causes the expected error message in kernel, seen at the dmesg output.

Plugging and unplugging device 2 always causes the expected kernel messages.

The usb2422 as well as device 2 are always visible to the Raspberry, no matter the state of the CP2108.

Additional info: CP2108 and USB2422 are on 1 pcb, the design is my own. I can share it if you want. device 2 is connected via a usb connector. I posted it in this forum as the whole thing with measuring the quarz making it work pointing to a electrical mistake, but thats only a guess.

Thanks for any help!

(edited after further debugging findings)

\$\endgroup\$
3
  • 2
    \$\begingroup\$ I suspect when you "measure the voltage on the quartz" you prevent the oscillator from running correctly causing the USB422 to go inoperative. When you stop measuring it then starts up, enumerates upstream and then its downtream devices enumerate. Probably what this means is that you've not designed your CP2108 surroundings correctly for enumeration - reread the data sheet and examine reference designs. Doing a commanded restart of the hub from the host might be a workaround if you're stuck with this board, but really you should find and fix the design mistake. \$\endgroup\$ – Chris Stratton Sep 24 '20 at 15:20
  • 1
    \$\begingroup\$ Yes, that's what i was guessing also. Now, some hours of debugging later, I think the USB2422 is the problem. when I reset the CP2108, it behaves as exprected: the USB data line goes back to GND. When i release the reset, it goes up to 3V again, not getting recognized on the bus. On contrary, when i hardreset the USB2422(via reset-PIN), the CP2108 gets recognized. If I softreset the USB2422 via the ioctl command in linux, it does not resolve my problem. \$\endgroup\$ – lo1 Sep 27 '20 at 14:39
  • 1
    \$\begingroup\$ It seeems like the measuring the quarz wasn't what made the difference in the first place. It seems like the only thing that makes it work consistently is turning it on, then turning off the power for not too long and then turning it on again. After turning it off, the supply voltage drops immeadiatly to 1V, then slowly furhter. If I turn it on before getting lower than 20mV, it works the next time. \$\endgroup\$ – lo1 Sep 27 '20 at 14:47
1
\$\begingroup\$

The problem was an overseen fact in the datasheet. It says that he USB2422 MUST be reset after startup to work properly.

After implementing a reset after each startup, there were no problems anymore.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.