---
title: "1 MCU, 2 WIZnet Chips: Dual SPI Networking on STM32"
url: "https://maker.wiznet.io/TheoIm/projects/1-mcu-2-wiznet-chips-dual-spi-networking-on-stm32/"
markdown_url: "https://maker.wiznet.io/TheoIm/projects/1-mcu-2-wiznet-chips-dual-spi-networking-on-stm32/md"
type: "WCC: WIZnet Created Content"
author: "theo"
author_url: "https://maker.wiznet.io/TheoIm/"
original_author: "Theo"
published: "2024-11-26"
language: "en"
hardware: ["WIZnet W5100S-EVB", "WIZnet Ethernet HAT"]
likes: 0
views: 1551
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# 1 MCU, 2 WIZnet Chips: Dual SPI Networking on STM32

> This project utilizes an W5100S-EVB(STM32 MCU Board) to manage 2 W5100S chips via separate SPI interfaces, enabling concurrent network operations from a single

Original author: Theo

## Components

- **WIZnet W5100S-EVB** x 1 ([docs](https://docs.wiznet.io/Product/iEthernet/W5100S/w5100s-evb))
- **WIZnet Ethernet HAT** x 1

## Article

**Controlling Two W5100S Ethernet HATs with STM32 MCUObjective**: Utilize the STM32 MCU board (W5100S-EVB) to activate an additional SPI channel and connect two WIZnet Ethernet HATs (W5100S), creating a project that **controls two W5100S chips with a single MCU**.

**Implementation Approach**: Use the **Chip Select (CS) pin alternately** to switch between the Ethernet HATs, enabling **communication between the MCU and both W5100S chips**.

**SPI Configuration**:

- **SPI1**:
  - Pins PA5, PA6, and PA7 (SCK, MISO, MOSI) from GPIOA.
  - Connected to **CHIP2 (WIZCHIP2)**.
  - CS: GPIOD pin 2, Reset: GPIOC pin 7.

- **SPI2**:
  - Pins PB13, PB14, and PB15 (SCK, MISO, MOSI) from GPIOB.
  - Connected to **CHIP1 (WIZCHIP1)**.
  - CS: GPIOD pin 7, Reset: GPIOD pin 8.

**Result**: Successfully connected **two Ethernet ports to a single MCU** and conducted a loopback test without any data loss.

**Details and Code**: Refer to the GitHub link for full implementation details.

[STM32_Dual_W5100S](https://github.com/theoim/STM32_Dual_W5100S)

---

Source: https://maker.wiznet.io/TheoIm/projects/1-mcu-2-wiznet-chips-dual-spi-networking-on-stm32/
