[riot-users] Using a W5100 with nucleo-f401...

Alexandre Abadie alexandre.abadie at inria.fr
Mon Jun 12 19:11:28 CEST 2017


Hi,

Welcome and thanks for your interest in RIOT !

----- Mail original -----
> I would like to run the gnrc_minimal example on my nucleo-f401 board.
> The board does not have ethernet BUT I use the arduino W5100 shield with
> it (https://www.arduino.cc/en/Main/ArduinoEthernetShieldV1). Hence
> 
> cd examples/gnrc_minimal
> BOARD=nucleo-f401 make clean all flash term

You are building your application the right way.

> But I see only the "RIOT network stack example application" message and
> no "My address is ...".
> 
> From compilation output it seems to be that w5100 is NOT compiled at
> all. As I has expected, there is still something missing.
> 
> Here are my questions:
> 
> 1. I have to tweak the build to include the w5100 compilation. How to do
> this?

Yes, you have to import the module corresponding to the W5100 driver. Simply add
USE_MODULE += w5100

> 
> 2. I have to use (and initialize) the SPI1 of the nucleo-f401 board. How
> to do this?

The initialization is done automatically, since the 'minimal' example uses the 'auto_init' module.

> 
> 3. Finally, I have to configure that the the SPI1 of nucleo-f401 it the
> 'underlying' SPI of w5100 and that the w5100 should be used for
> networking. How to do this?

You can copy the file drivers/w5100/include/w5100_params.h in examples/minimal and edit the parameters to your needs. Otherwise you can directly edit the file in the drivers directory but this is not considered as good practice.

We know that this part of RIOT is not very well documented. An issue exists to keep track of this weakness [1]

Regards,

Alex

[1] https://github.com/RIOT-OS/RIOT/issues/7001

> 
> Kind regards,
> 
> aanno
> 
> 
> 
> 
> 
> _______________________________________________
> users mailing list
> users at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/users
> 


More information about the users mailing list