---
title: "Cannot write to register 0x0010 (SPIR1)"
url: "https://maker.wiznet.io/forum/15335"
markdown_url: "https://maker.wiznet.io/forum/15335/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "dennisnsmith2000"
created: "2024-10-26T01:56:16+09:00"
last_activity: "2024-10-31T07:48:59+09:00"
language: "en"
views: 2
replies: 1
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# Cannot write to register 0x0010 (SPIR1)

## Question

Asked by dennisnsmith2000 on 2024-10-26 in Ethernet Chips.

Hello friends, I seem to be having an issue setting the IP on my W5500. When I try to write register 0x0010 to 0xA8 it reads back 1, I need it to write back 168. I have tried to several different values and it seems like only 0x20 works. I'm pretty sure SPI is working as I am able to write all other registers without issue. It its interesting how I am able to write register 0x0002 (GAR1) to 0xA8 with out issue. Any help would be greatly appreciated!

Code:

void write_source_ip() {
WIZCHIP_WRITE(0x000F, 0xC0);
WIZCHIP_WRITE(0x0010, 0xA8);
WIZCHIP_WRITE(0x0011, 0x64);
WIZCHIP_WRITE(0x0012, 0x4F);

uint8_t ip_read[4];
ip_read[0] = WIZCHIP_READ(0x000F);
ip_read[1] = WIZCHIP_READ(0x0010);
ip_read[2] = WIZCHIP_READ(0x0011);
ip_read[3] = WIZCHIP_READ(0x0012);

printf("\r\nSetting IP Address: %u.%u.%u.%u\r\n", ip_read[0], ip_read[1], ip_read[2], ip_read[3]);
}
I am on a PIC24EP512GP806 With the CCS compiler.

## Replies

### Reply 1 by dennisnsmith2000, 2024-10-31

I have tried these things, I seem to be having a similar issue however read buf reads back 0x01 for all values

---

Source: https://maker.wiznet.io/forum/15335
