W5500 lan.active(True) No Response
Posted: Tue Jan 25, 2022 7:56 am
I had porting the micropython to H743VIT6 platform, it include the W5500 network function.But when run the nic.active(True), it is carsh and no response.The code as follow:
How to solve this issue.Thanks!
Code: Select all
from machine import SPI, Pin
import time
import network
def w5x00_init():
spi = SPI(2, baudrate = 20000_000)
cs = Pin(pyb.Pin.board.PB12, mode= Pin.OUT)
rst =Pin(pyb.Pin.board.PB11, mode= Pin.OUT)
nic = network.WIZNET5K(spi, cs, rst)
nic.ifconfig(('192.168.3.20','255.255.255.0','192.168.3.1','8.8.8.8'))
#nic.ifconfig(('192.168.3.20','','',''))
#print(nic.ifconfig('dhcp'))
nic.active(True)
time.sleep(1)
while not nic.isconnected():
time.sleep(1)
print(nic.regs())
w5x00_init()