Wiznet makers

jaden

Published February 20, 2026 ©

107 UCC

18 WCC

57 VAR

0 Contests

0 Followers

0 Following

Original Link

SliconLabs Gecko SDK W5500 driver

SliconLabs Gecko SDK W5500 driver

COMPONENTS
PROJECT DESCRIPTION

How to Use W5500 EtherClick with Gecko SDK on Silicon Labs Platforms?

Summary

Silicon Labs provides an official hardware driver example integrating the WIZnet W5500 Ethernet controller via the ETH WIZ Click (EtherClick) board into the Gecko SDK (GSDK) environment. This project demonstrates how W5500 is connected through SPI using Gecko Platform drivers such as SPIDRV, Sleep Timer, and IO Stream. Notably, although W5500 supports hardware TCP/IP offload, this driver focuses on low-level Ethernet control and does not implement full hardware TCP socket usage within the provided example.


What the Project Does

This repository provides a platform driver that enables Silicon Labs MCUs (such as the BGM220P Explorer Kit) to communicate with the W5500 Ethernet controller mounted on a MikroE ETH WIZ Click board.

The system architecture is structured as follows:

MCU (EFR32/BGM series) runs application firmware under Gecko SDK.

SPI (SPIDRV) connects the MCU to W5500.

GPIO lines handle reset and chip-select.

Gecko platform services provide timing, delay, and logging utilities.

The driver abstracts W5500 register access and Ethernet frame handling.

Unlike a full TCP/IP application example, this repository is focused on building a hardware abstraction layer that allows the MCU to control the W5500 at register level. Higher-level networking stacks are not implemented in this example.

The key takeaway is that a major semiconductor vendor (Silicon Labs) officially distributes a reference driver using W5500-based EtherClick hardware within its SDK ecosystem.


Where WIZnet Fits

The exact product used is:

WIZnet W5500 Ethernet Controller
Integrated on: MikroE ETH WIZ Click (EtherClick)

W5500’s architectural role:

SPI-based Ethernet controller

Integrated MAC + PHY

Internal 32 KB buffer

Supports up to 8 independent sockets

Hardware TCP/IP offload capability (not fully utilized here)

In this specific Silicon Labs project:

W5500 acts as an external Ethernet controller

The MCU communicates via SPI using Gecko SPIDRV

The driver configures and accesses W5500 registers

Full hardware TCP socket features are not actively demonstrated in the example

This design is particularly suitable when:

The MCU lacks an internal Ethernet MAC/PHY

Deterministic wired Ethernet is required

Memory constraints make a full software TCP/IP stack undesirable

Stable industrial Ethernet connectivity is preferred over Wi-Fi


Implementation Notes

The repository clearly integrates W5500 into Gecko SDK components.

1. Binding W5500 to Gecko SPIDRV

File:
inc/w5x00_config.h

 
#define w5x00_spi_handle sl_spidrv_mikroe_handle

This line binds the W5500 driver to the SPIDRV instance generated by Gecko’s component system.
It ensures that the driver uses the configured SPI peripheral instance named mikroe inside Simplicity Studio.

Why this matters:
It eliminates the need for a custom SPI HAL and tightly integrates W5500 into the GSDK driver model.


2. Platform Abstraction Layer Using Gecko Services

File:
src/w5x00_platform.c

Examples include:

 
GPIO_PinOutClear(W5x00_CS_PORT, W5x00_CS_PIN); SPIDRV_MTransmitB(w5x00_spi_handle, tx_buf, len);

and timing functions mapped via:

File:
inc/w5x00_platform.h

 
sl_udelay_wait(us); sl_sleeptimer_delay_millisecond(ms);

These show that:

GPIO control is handled by Silicon Labs GPIO driver

SPI transfers use SPIDRV

Delays use Gecko Sleep Timer and microsecond delay services

The W5500 driver is therefore not a standalone library but a properly layered Gecko Platform component.


3. Chip Identification Including W5500

File:
src/w5x00.c

The initialization logic reads chip identification registers and confirms the device type (including W5500). This ensures compatibility across W5x00 family variants.


Important Technical Point: Hardware TCP Not Used

Although W5500 supports:

Hardware TCP/IP stack

Hardware socket management

TCP/UDP offload

This specific Silicon Labs driver does not provide:

High-level TCP client/server examples

HTTP/DHCP application logic

Full socket-based communication samples

Instead, it focuses on:

Register-level control

SPI transport abstraction

Ethernet controller initialization

This makes the repository more of a hardware driver integration example rather than a complete TCP/IP offload demonstration.

For developers expecting ready-to-run TCP server examples using W5500 hardware sockets, additional implementation work is required.


Practical Tips / Pitfalls

Ensure the SPIDRV instance name matches sl_spidrv_mikroe_handle.

Verify SPI mode and clock configuration match W5500 requirements.

Confirm proper reset timing using sl_udelay_wait.

Check chip-select toggling logic if SPI communication fails.

Validate PHY link status before attempting network operations.

Do not assume hardware TCP is automatically enabled—socket configuration must be explicitly implemented.


FAQ

1. Why use W5500 in a Silicon Labs platform instead of internal networking?

Many Silicon Labs MCUs (e.g., BGM/EFR series) do not include an Ethernet MAC/PHY. W5500 provides a complete external Ethernet controller over SPI, reducing firmware complexity compared to implementing a full software TCP/IP stack.


2. How is W5500 connected to the MCU?

Through SPI using Gecko’s SPIDRV component. Chip-select and reset are controlled via GPIO, and timing services are provided by Gecko Sleep Timer APIs.


3. What role does W5500 play in this project?

It acts as an external Ethernet controller. The driver initializes and controls it at register level but does not implement full hardware TCP socket applications.


4. Can beginners follow this project?

Intermediate embedded experience is recommended. Users should understand:

Simplicity Studio component configuration

SPI peripheral setup

GPIO handling

Basic Ethernet controller concepts


5. How does this compare to using LwIP with MAC+PHY?

Using LwIP requires an MCU with built-in Ethernet MAC and an external PHY, plus significant RAM for the TCP/IP stack. W5500 reduces firmware stack requirements by providing integrated MAC/PHY and hardware socket capability. However, in this example, the hardware TCP capability is not fully leveraged.


Source

Silicon Labs Platform Hardware Drivers Repository:
https://github.com/SiliconLabs/platform_hardware_drivers/tree/master/ethernet_w5x00

License: Refer to repository license file.


Tags

W5500
EtherClick
ETH WIZ Click
Silicon Labs
Gecko SDK
GSDK
SPIDRV
SPI Ethernet
Embedded Ethernet

 

 

 

 

How to Use W5500 EtherClick with Gecko SDK on Silicon Labs Platforms?

Summary

Silicon Labs는 Gecko SDK(GSDK) 환경에서 WIZnet W5500 Ethernet 컨트롤러를 MikroE ETH WIZ Click(EtherClick) 보드를 통해 사용하는 공식 하드웨어 드라이버 예제를 제공한다. 이 프로젝트는 W5500을 SPI 기반으로 연결하고, SPIDRV·Sleep Timer·IO Stream 등 Gecko Platform 컴포넌트와 통합하는 구조를 보여준다. 중요한 점은 W5500이 하드웨어 TCP/IP 오프로드 기능을 지원함에도 불구하고, 해당 드라이버는 이를 적극적으로 활용한 TCP 소켓 예제를 포함하지 않고 하드웨어 제어 계층에 집중하고 있다는 것이다.


What the Project Does

이 저장소는 Silicon Labs MCU(예: BGM220P Explorer Kit)가 MikroE ETH WIZ Click 보드에 탑재된 W5500 Ethernet 컨트롤러와 통신할 수 있도록 하는 플랫폼 드라이버를 제공한다.

전체 시스템 구조는 다음과 같다:

MCU (EFR32/BGM 시리즈): Gecko SDK 기반 애플리케이션 실행

SPI (SPIDRV): MCU ↔ W5500 통신 인터페이스

GPIO: Chip Select 및 Reset 제어

Gecko Platform 서비스: Delay, Timer, Logging, Assert 등

W5x00 드라이버 계층: W5500 레지스터 접근 및 기본 초기화 처리

이 프로젝트는 완성된 TCP 서버/클라이언트 애플리케이션이 아니라, W5500을 Gecko SDK 환경에 정식 컴포넌트로 통합하는 하드웨어 드라이버 레벨 예제에 가깝다.

핵심 포인트는 다음과 같다:

글로벌 반도체 기업인 Silicon Labs가 자사 공식 SDK 환경에서 W5500 기반 EtherClick을 사용하는 가이드를 제공한다는 점.

이는 W5500이 단순 Maker 영역을 넘어, 상용 SDK 레벨에서 채택된 Ethernet 컨트롤러임을 보여주는 사례다.


Where WIZnet Fits

사용된 제품:

WIZnet W5500 Ethernet Controller
탑재 보드: MikroE ETH WIZ Click (EtherClick)

W5500의 구조적 역할:

SPI 기반 Ethernet 컨트롤러

내부 MAC + PHY 통합

32KB 내부 버퍼

최대 8개 소켓 지원

하드웨어 TCP/IP 오프로드 기능 지원

이 프로젝트에서의 역할은 다음과 같다:

외부 Ethernet MAC/PHY 역할 수행

MCU는 SPI를 통해 레지스터 단위로 제어

네트워크 초기화 및 기본 Ethernet 동작 지원

고수준 TCP 소켓 애플리케이션은 포함되지 않음

즉, 이 예제는 W5500의 “하드웨어 TCP 기능을 적극 활용한 완성형 네트워크 스택”이 아니라, Gecko SDK와의 정식 통합을 보여주는 플랫폼 드라이버 예제다.


Implementation Notes

1. Gecko SPIDRV와의 연결

파일:
inc/w5x00_config.h

 
#define w5x00_spi_handle sl_spidrv_mikroe_handle

이 정의는 W5500 드라이버가 Gecko SDK에서 생성된 SPIDRV 인스턴스(mikroe)를 사용하도록 바인딩한다.

의미:

별도의 SPI HAL 작성 불필요

Simplicity Studio Component 설정과 직접 연동

Gecko SDK 구성 시스템에 완전히 통합됨


2. Gecko Platform 서비스 사용

파일:
src/w5x00_platform.c

예시:

 
GPIO_PinOutClear(W5x00_CS_PORT, W5x00_CS_PIN); SPIDRV_MTransmitB(w5x00_spi_handle, tx_buf, len);

파일:
inc/w5x00_platform.h

 
sl_udelay_wait(us); sl_sleeptimer_delay_millisecond(ms);

의미:

GPIO 제어는 Silicon Labs GPIO 드라이버 사용

SPI 전송은 SPIDRV 사용

지연 및 타이밍은 Sleep Timer 서비스 사용

이 구조는 W5500 드라이버가 독립 라이브러리가 아니라, Gecko Platform 계층 위에 설계된 통합 드라이버임을 보여준다.


3. W5500 칩 식별 로직

파일:
src/w5x00.c

초기화 과정에서 칩 ID 레지스터를 읽어 W5500 여부를 판별한다. 이는 W5x00 계열 간 호환성을 고려한 설계다.


Important Technical Point: HW TCP를 사용하지 않음

W5500은 다음 기능을 지원한다:

하드웨어 TCP/IP 스택

하드웨어 소켓 관리

TCP/UDP 오프로드

그러나 이 Silicon Labs 예제는:

TCP 서버/클라이언트 애플리케이션 미포함

DHCP/HTTP 고수준 로직 미포함

W5500 하드웨어 소켓 API 사용 예제 없음

즉, 하드웨어 TCP를 적극 활용하는 구조가 아니라, Ethernet 컨트롤러 제어 계층까지만 구현되어 있다.

따라서 이 저장소는:

“W5500 HW TCP 활용 예제”라기보다
“Gecko SDK에 W5500을 통합하는 공식 플랫폼 드라이버”

에 가깝다.


Practical Tips / Pitfalls

SPIDRV 인스턴스 이름이 sl_spidrv_mikroe_handle과 일치해야 한다.

SPI 모드 및 클럭 설정이 W5500 요구사항과 맞는지 확인할 것.

Reset 타이밍은 sl_udelay_wait 기반으로 정확히 유지해야 한다.

Chip Select 토글 순서가 잘못되면 통신 오류 발생 가능.

PHY Link 상태 확인 후 네트워크 동작 시작 권장.

하드웨어 TCP는 자동 활성화되지 않으며, 별도 소켓 설정이 필요하다.


FAQ

1. 왜 Silicon Labs 플랫폼에서 W5500을 사용하는가?

EFR/BGM 계열 MCU는 Ethernet MAC/PHY가 내장되지 않은 경우가 많다. W5500은 SPI 기반으로 MAC+PHY를 통합 제공하여 외부 Ethernet 확장을 단순화한다.


2. Gecko SDK와 어떻게 연결되는가?

Simplicity Studio에서 SPIDRV, IO Stream, Sleep Timer 등의 컴포넌트를 추가하고, 해당 인스턴스를 W5500 드라이버가 사용하도록 구성한다.


3. 이 프로젝트에서 W5500의 구체적 역할은 무엇인가?

외부 Ethernet 컨트롤러로서 레지스터 제어 및 초기화 역할을 수행한다. TCP 애플리케이션 레벨 동작은 포함되지 않는다.


4. 초보자도 가능한가?

중급 이상 임베디드 개발 경험이 권장된다.
SPI, GPIO, Simplicity Studio 컴포넌트 구성 이해가 필요하다.


5. LwIP + MAC/PHY 구성과 비교하면?

LwIP는 상당한 RAM과 소프트웨어 TCP/IP 스택 관리가 필요하다. W5500은 MAC+PHY 통합 구조로 설계 단순화를 제공한다. 다만, 이 예제에서는 하드웨어 TCP 오프로드를 적극 활용하지 않는다.


Source

Silicon Labs Platform Hardware Drivers Repository:
https://github.com/SiliconLabs/platform_hardware_drivers/tree/master/ethernet_w5x00

License: Repository 내 LICENSE 파일 참조


Tags

W5500
EtherClick
ETH WIZ Click
Silicon Labs
Gecko SDK
GSDK
SPIDRV
SPI Ethernet
Embedded Ethernet
EFR32
BGM220
 

Documents
Comments Write