5 years, 8 months ago.

What are the necessary connections for this library

Can someone tell me please how should I connect my ethernet shield to the STM32 nucleo?

(Please don't answer "see the image" since that image is hardly understandable.)

I am connecting MISO MOSI and CLK correctly I think... (either to PA_7, PA_6 and PA_5 or PB_15 , PB_14 and PB_13)

What I am not sure is how I should connect CS (chip select) and specially Reset (I check the library and it is supposed to reset the shield but where is the reset pin for the shield?? (I tried the one on the left and it does not work)

Currently the program stops at "Can't find DHCP... retrying..."

Any help please?

Question relating to:

1 Answer

5 years, 8 months ago.

The constructor in main.cpp clearly shows what pins are used, see this link https://developer.mbed.org/teams/shields/code/Seeed_Ethernet_Shield/file/758802529bb0/main.cpp .

Thank you for your answer. However i am not asking out of laziness. I already read main.cpp. I have also read some of the library files. have tried it and it does not work. It is not clear. For example in main.cpp /**

  • D11 - MOSI pin
  • D12 - MISO pin
  • D13 - SCK pin
  • D10 - SEL pin
  • NC - Reset pin; use D5 otherwise the shield might get into reset loop
  • / WIZ820ioInterface eth(D11, D12, D13, D10, D5);

Ok. No problem with MOSI, MISO and CLK (although the notation is Arduino's not STM32 right??) So I am connecting the pins in the middle of the shield to MOSI MISO and CLK pins of the STM32.

Then it says: D10 select pin.... well, ok this is I suppose PB_6 right?? Although the SPI1 NSS of the STM32 >>is not<< PB_6 but PA_4 I tried both options.

What it buffles me the most is NC - Reset pin; use D5 otherwise the shield might get into reset loop NC?? Non connected?? so I should not connect anything??? Then what for is D5?? should I connect PB_4??? and if I should , should I connect it with what pin in the shield???

As you can see, the notation in main.cpp is not clear so I will be very very grateful if someone who has this working can illustrate me on how should I connect what pins to what pins so as to make it work

A thousand thanks in advance

posted by Cristian Fuentes 26 Jan 2016

Have you tried using the original Arduino pin notation this should work, otherwise the constructor should look like this :

WIZ820ioInterface eth(PA_7, PA_6, PA_5, PB_6, PB_4);

I do not have the Seeed shield so cannot test.

EDIT: Maybe this is what you are missing, take your shield and plug it into the nucleo, drag and drop your bin file to your nucleo, you should then be up and running.

EDIT: All you need to know is that when you connect your shield to your nucleo PB_4 will be connected correctly and is controlled by the software.

Important. I don't know which Ethernet shield you have. I checked, and I found an old Arduino w5100 board, this board has the spi connected to the 6 pin connector. If your board is the same then you will need to find a method to connect wires to this connector (maybe 90 deg pins) to the pins shown in the constructor, you will not need to do this for (reset) PB_4, as that pin is ok.

EDIT: I cannot find the schematic for your board so try connecting PB_4 to the pin marked 5/D5 on the shield.

posted by David Fletcher 26 Jan 2016


Ok. If I do that, to what should I connect STM32's PB_4???

posted by Cristian Fuentes 26 Jan 2016

All you need to know is that when you connect your shield to your nucleo PB_4 will be connected correctly

To what should I connect PB_4 to consider it correct?? that is what I dont know :(

posted by Cristian Fuentes 27 Jan 2016