Skip to content

How to use PWM as W5x00 clock

Demo with W55RP20-EVB-PICO use RP2040 PWM output 25MHz as W5500 clock.

momososo

Published October 05, 2024 · © GNU General Public License, version 3 or later (GPL3+)

How to use PWM as W5x00 clock

Components

Hardware components Software Apps and online services

Project description

Story

From schematic we know that W55RP20-EVB-PICO have two crystal, 12MHz for RP2040 and 25MHz for W5500 chip.

https://docs.wiznet.io/Product/ioNIC/W55RP20/w55rp20-evb-pico#schematic

This project is target to remove 25MHz and use RP2040 PWM output 25MHz as W5500 clock.

Hardware

W55RP20-EVB-PICO

Software

micropython
hercules 

Thonny

Build

First I find out Y1 25MHz on board and with PCB file on github  I identify W55-XI pin.

How to use PWM as W5x00 clock, Build

Remove Y1 and solder 1K ohm connect board pin19(GP14) and W55-XI pin.

How to use PWM as W5x00 clock, Build

Code

Since I remove w5500 clock, it no longer works properly. It must be given clock during initialization, use below code to output PWM.

from machine import PWM #PWM module

#W5x00 chip init
def w5x00_init():
    PWM(14,freq=25000000,duty_ns=20) #make PWM as w5x00 clock
    
    spi = WIZNET_PIO_SPI(baudrate=31_250_000, mosi=Pin(23),miso=Pin(22),sck=Pin(21)) #W55RP20 PIO_SPI
    nic = network.WIZNET5K(spi,Pin(20),Pin(25)) #spi,cs,reset pin
    nic.active(True)
    

 

Measure PWM pin signal.

How to use PWM as W5x00 clock, Code
How to use PWM as W5x00 clock, Code

 

Run example Loopback, it work good as use Y1. 

How to use PWM as W5x00 clock, Code

Conclusion

I make a simple project it can reduce the BOM cost. But the reliability requires longer testing.

Documents

Comments

Similar projects you might like

Comments