Wiznet makers

scott

Published November 01, 2022 ©

81 UCC

20 WCC

40 VAR

0 Contests

0 Followers

0 Following

Original Link

Nucleo-F401RE + W5500モジュール + MicroPythonでインターネット接続

This project utilizes Nucleo-F401RE + W5500 based on MicroPython.

COMPONENTS Hardware components

WIZnet - W5500

x 1


PROJECT DESCRIPTION

W5100 could be controlled by 8bit bus as well as SPI, but W5500 is only for SPI.
The module I purchased was about the size of a Frisk case.
The price was about 1000 yen on Amazon Marketplace, but it seems that you can buy it for about $6 to $8 on Aliexpress.

w5500.jpg

Usage is almost the same as W5100, but MicroPython needs to incorporate the driver for W5500.
Unlike the W5100, the W5500 is supported by MicroPython, so no code rewriting is required.
In the current version of MicroPython, you can specify the WIZnet5K chip type as "MICROPY_PY_WIZNET5K=5500" in the make option, so the make method from git clone is shown below.

git  clone https://github.com/micropython/micropython.git 
cd  micropython/ 
git  submodule update --init 
cd  ports/unix 
make  deplibs 
make 
cd  ../stm32/ 
make  BOARD=NUCLEO_F401RE CROSS_COMPILE=~/gcc-arm-none -eabi-5_4-2016q3/bin/arm-none-eabi- MICROPY_PY_WIZNET5K=5500 
cp  build-NUCLEO_F401RE/firmware.hex /mnt/hgfs/share/ 
# After this, write to the board with ST-Link Utility

Since the terminal to be connected is also SPI, it is basically the same.
The pin arrangement (back side) of the purchased module was as shown in the figure below.

w5500-pins.jpg

By the way, the pin header of the module I purchased was slanted like the one below
.

w5500module.jpg

The connection with Nucleo-F401RE is as follows (when using SPI2).
The reset can be freely determined, but the rest is automatically determined by the SPI bus used.

W5500 Nucleo-F401RE
3.3V  3V3
MISO  PB14(MISO)
MOSI  PB15(MOSI)
SCS   PB12(NSS)
SCLK  PB13(CLK)
5V    -
GND   GND
RST   PC8
INT   -
NC    -

Connection diagram seen from the front

stm32-w5500-2.png

(Fritzing data for W5500 module here)

How to use from MicroPython is for W5100 is exactly the same as
The code is fully compatible.
I tried connecting to the STARWARS site as usual.

w5500-starwars.png

The STM32 + W5500 combination is more powerful than the Arduino + Ethernet shield, and the size is compact, so I think it's pretty good for wired use.

Documents
Comments Write