EtherCard is a driver for the ENC28J60 chip, compatible with Arduino IDE 1.6.3 (or later).
Adapted and extended from code written by Guido Socher and Pascal Stang.
The documentation for this library is at http://jeelabs.net/pub/docs/ethercard/.
PIN Connections (Using STM32F103):
The CS pin is selectable with the ether.begin() function.
e.g. If you want to use the PA9 as CS pin then you can initiallize the ethernet module inside the sketch as:
if (ether.begin(sizeof Ethernet::buffer, mymac,
) == 0)
By default the pin PA8 is used as CS (you don't have to initiallize it).
That library works perfect on Arduino IDE 1.6.3 (or later) with Arduino_STM32 project installed.
The Arduino STM32 project has a forum (STM32duino) also for getting or for providing help to people that are interested in that project .