Hi, I have this same problem. No matter I set spi baudrate to 100000, 200000, 1000000, 2000000, 4000000, 8000000. Result always be 0x0 not 0x08. Any suggestion?vinz-uts wrote: ↑Tue Nov 16, 2021 9:24 pmFor the `AssertionError: Expected 0x08.`, it seems is that the problem is in writing register on the chip. Are you sure your connected pin configuration is right. I had the same error when I had choose too high frequency for SPI. `htonl` and `htons` are function defined in `wiznet5k_socket`, so, if the import works, you have to be able to manually call these function.
How to include driver into micropython compilation
Re: How to include driver into micropython compilation
-
- Posts: 2
- Joined: Tue Jul 27, 2021 4:54 pm
Re: How to include driver into micropython compilation
I faced the same issues. Finally I decided to not define a reset output pin, which solved the issue of 0x08. If the pin shall be used, I had to explicitly turn it on and wait a short time before creating the network interface. See code example below. I use different SPI and CS pins than on the previous posts
Code: Select all
spi = SPI(1)
cs = Pin(15, Pin.OUT)
rst = Pin(19, Pin.OUT)
rst.on()
time.sleep(1)
nic = WIZNET5K(spi_bus=spi, cs=cs)