Search the Community
Showing results for tags 'ENC28J60'.
I have an STM32F4 that refuses to work with both SD & ENC28J60 ethernet modules using MIDIbox NG & CV V2. Working: Ethernet and no SD When I boot it without an SD inserted, the ethernet works fine: Ethernet cable connected: yes Ethernet MAC address: 00:39:36:30:39:31 Ethernet services running: yes DHCP: enabled IP address: 192.168.0.100 Netmask: 255.255.255.0 Default Router (Gateway): 192.168.0.1 Not Working: SD and ethernet together (ethernet gets disabled) However, the moment I insert an SD card, I get various errors and the ethernet disconnects: [MIOS32_ENC28J60_PackageReceive] glitch detected - Ptr: ff09, Status: 7fb8 (max: 05ee) cd7f or [MIOS32_ENC28J60_PackageReceive] glitch detected - Ptr: ffff, Status: ffff (max: 05ee) ffff Working: SD and no ethernet If I boot with the SD card inserted, the MAC address is recognized but the plugged-in ethernet cable isn't detected (which could be due to another error): Ethernet cable connected: no Ethernet MAC address: 00:39:36:30:39:31 Ethernet services running: no DHCP: enabled IP address: not available yet Netmask: not available yet Default Router (Gateway): not available yet When this happens, my router actually recognizes the ENC28J60 and assigns it an IP address. Here's my cheap-o eBay ethernet adapter:
I haven't been able to find any reference to this info on uCapps.de and the forum so it's reference info for anyone who wants to connect an external SD card socket and ENC28J60 based ethernet board at the same time. Both of these devices are connected to the core with SPI. While I have been try to get them both to work at the same time I have learnt that SPI can be connected in two ways, "Star" and "Chain". The SD card socket and ethernet module need to connected in a "Star" configuration in order to work. Basically the two devices share Serial In (MOSI) , Serial Out (MISO) and Serial Clock (SCK) signals but each have individual Slave Select (SS) signals. The attached picture illustrates this pretty well.