Jump to content

Ethernet and SD Card - Dual SPI Connection


Rowan
 Share

Recommended Posts

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.

post-3551-0-01144600-1425130737_thumb.gi

Edited by Rowan
Link to comment
Share on other sites

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 by sneakthief
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by CJ55
Link to comment
Share on other sites

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 by CJ55
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...