I have a complex EMI problem.
There is a RPi Compute Module along with a LAN9512 and GSM modem (M66).
Layout guidelines are strictly following the datasheets' recommendations, I don't think there is anything can be much better around them on the layout.
Now RPi and LAN9512 are connected via USB differential pairs, but when GSM modem is active (i.e. connects to network, receive call etc), the LAN9512 disconnects from usb and comes back only after a full reboot.
This is the main issue which I'd like to solve here.
Console log of the issue:
kernel: [ 10.172712] usb 1-1-port1: disabled by hub (EMI?), re-enabling... kernel: [ 10.172750] usb 1-1.1: USB disconnect, device number 4 kernel: [ 10.173135] smsc95xx 1-1.1:1.0 eth0: unregister 'smsc95xx' usb-20980000.usb-1.1, smsc95xx USB 2.0 Ethernet kernel: [ 10.175308] hub 1-1:1.0: hub_ext_port_status failed (err = -71) kernel: [ 10.175332] usb 1-1-port1: connect-debounce failed kernel: [ 10.192773] usb 1-1: Failed to suspend device, error -71
What could also help:
On the board I have DC generators:
- 5V - MP2359
- 4.1V - MP2359
- 3.3V & 1.8V - PAM2306 (common)
- 2.5V - AP7115
They are wired like this:
18V input DC -----> 5V -----> 3.3V ----> 2.5V -----> 1.8V -----> 4.1V
GSM modem is powered from 4.1V so it is actually separated from everything else.
These spikes (squares) are only presented on 3.3V and 1.8V which is regulated by the very same PAM2306. Neither on the 2.5V nor the 5V does have these spikes. Also the 4.1V which is actually for the GSM does NOT have these spikes either. There are 100uF, 100nF, 33pF and 10pF decoupling capacitor on the 4.1V rail.
PAM2306's layout (on the top right there is the 1.8V at the inductor's right side): Please note that this layout is the recommended by the datasheet. I know those lines going around look strange though.
I also tried adding a 100uF decoupling to the 3.3V rail, but did not help.
One thing should be good to know here: could these spikes cause the USB disconnect?
I have removed PAM2306 power module and replace with 2 MP2359 for the 3.3V and 1.8V.
Now the boards seems more stable, however the USB disconnects after connecting the GSM:
# pppd call gprs ... lot of pppd messages ... pppd: primary DNS address a.b.c.d pppd: secondary DNS address a.b.c.d usb 1-1.1: USB disconnect, device number 3 smsc95xx 1-1.1:1.0 eth0: unregister 'smsc95xx' usb-20980000.usb-1.1, smsc95xx USB 2.0 Ethernet smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
So as you can see, after getting GPRS IP addresses, the ETH suddenly unregisters itself. After changing those power modules the previous 'disabled by hub' message went away so the situation is now better but not perfect.
What would you recommend?
After an hour without trying to dial up GSM, the USB disconnected from the PI. So not the power rails were the root of my problems.