I have a CM4 module on a custom shield board for an Arduino Due. The 'native' USB of the Due connects to the USB pins of the CM4 to send MIDI data. The problem is, when I apply power the CM4 does not boot if the USB is connected. If I unplug it, it boots. After reconnecting the USB, the CM4 still runs fine, but the MIDI data coming in the USB is spotty at best. Not all the data that should be coming in is there (I send a string of MIDI settings and not all of them appear to show up).
If I recreate this with the CM4 I/O board, everything seems to work ok, so I think the programming is correct. That seems to indicate there is a problem on my custom board, but I'm not sure where.
From the datasheet, pins 103 and 105 should be D- and D+ respectively. I only needed the one port, so I didn't include the support hardware for the extra ports (which it appears from other circuits online should work just fine). I even made sure the traces were the same length.
Could I be looking at something tied together that shouldn't be?
-
- Posts: 12
- Joined: Wed Feb 04, 2015 4:32 pm
-
- Posts: 12
- Joined: Wed Feb 04, 2015 4:32 pm
Re: USB hangs the CM4
Update. Still not working perfect, but if I plug an unpowered USB hub into my carrier board and plug the Arduino into that, it doesn't hang on boot. Still not getting all the MIDI data I should, but it's a start.
Re: USB hangs the CM4
I suspect what is happening the USB device you are connecting is pulling D+ high to signal attach because you have +5v connected to the connector. The CM4 doesn't like being back power via the USB lines while the +3.3v PSU is starting up. Try adding a power switch on the +5v signal controlled by nEXTRST.