Rowan Posted February 28, 2015 Report Posted February 28, 2015 (edited) 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. Edited February 28, 2015 by Rowan Quote
TK. Posted March 1, 2015 Report Posted March 1, 2015 Thanks for pointing this out! It could make sense to document this in the Wiki as well. Best Regards, Thorsten. Quote
sneakthief Posted March 6, 2015 Report Posted March 6, 2015 (edited) Heads up: this is a currently big issue for anybody wanting to use OSC over ethernet with projects like MIDIbox CV V2. When the SD card is inserted, the ethernet module doesn't function! Seems I have a different issue here than I originally thought. Taking this to a different thread. Edited March 7, 2015 by sneakthief Quote
Rowan Posted March 7, 2015 Author Report Posted March 7, 2015 The SD Card uses RC1 as SS and the Ethernet module uses RC2 as SS. I have both working at the same time configured this way, no changes to the code are necessary. One thing I did find that the Ethernet module wouldn't work running off the 3.3v suppy from J16. I had to jump 5V from the discovery board to get it to work. Quote
sneakthief Posted March 7, 2015 Report Posted March 7, 2015 I tried both 5V and 3.3V. Whenever I insert the SD card, the ethernet just dies: Quote
CJ55 Posted March 7, 2015 Report Posted March 7, 2015 (edited) I would not use 5V for the ENC28J60. The absolut maximum rating according to the data sheet is 3.6V Some other interesting informations from the ENC28J60 data sheet: Supply Voltage: Min. 3.1V, Typ. 3.3V, Max. 3.6V Operating Current: Typ. 120mA to 160mA, Max. 180mA And here some facts from the STM32F4DISCOVERY: The STM32F4 microprocessor is powered by only 3.0V (that means all outputs are also only 3.0V) There is a voltage regulator (LD3985M33R) on the board which indeed outputs 3.3V, but there is a diode (BAT60J) after it with a voltage drop of 0.3V => 3.0V. And the max. current the voltage regulator can deliver is 150mA. According to the data sheet of the DISCOVERY board it can provide max. 100mA for external sources. Conclusion: To operate the ENC28J60 you need an additional 3.3V source. Maybe another voltage regulator (5V -> 3.3V). Edited March 7, 2015 by CJ55 Quote
Rowan Posted March 7, 2015 Author Report Posted March 7, 2015 The board I'm using has a 5V > 3.3V circuit so I'm safe there. The point you make about the voltage drop on the diode is valid and could explain why I'm having no dice with the 3.3V supply from J16. Quote
CJ55 Posted March 7, 2015 Report Posted March 7, 2015 (edited) Ok, I just wanted to point out that the STM32F4DISCOVERY board delivers only 3.0V and not 3.3V and only 100mA. The schematic of the MBHP CORE_STM32F4 is wrong in this regard. The ENC28J60 needs min. 3.1V (and max. 3.6V) and between 120mA and 180mA. Edited March 7, 2015 by CJ55 Quote
sneakthief Posted March 9, 2015 Report Posted March 9, 2015 I used a 3.3V bench power supply and I still get errors when the SD is also connected. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.