---
title: "About the culation of registers' adress"
url: "https://maker.wiznet.io/forum/12829"
markdown_url: "https://maker.wiznet.io/forum/12829/md"
type: "Forum topic"
category: "Ethernet Chips"
author: "jiang1xia"
created: "2018-04-04T02:28:31+09:00"
last_activity: "2018-04-05T06:13:46+09:00"
language: "en"
views: 565
replies: 3
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# About the culation of registers' adress

## Question

Asked by jiang1xia on 2018-04-04 in Ethernet Chips.

According to the dirver code, the SN_MR adress is 0x00_0008, but according to the datasheet, it is BSB adress 0x01+OFFSET adress 0x0000, 0x01_0000.
There is the code #define Sn_MR(N) (*W5500_IO_BASE* + (0x0000 &lt;&lt; 8) + (WIZCHIP_SREG_BLOCK(N) &lt;&lt; 3)) for socket0
what in the datasheet is the below figure,

[![%E5%9B%BE%E7%89%87](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/9/92b2be8a15587e978a19a53c8ba77c9691666135.png) %E5%9B%BE%E7%89%87788×123 33.8 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/9/92b2be8a15587e978a19a53c8ba77c9691666135.png)

## Replies

### Reply 1 by Eugeny, 2018-04-04

![](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/48.png) jiang1xia:

> According to the dirver code, the SN_MR adress is 0x00_0008

Where did you find it?

### Reply 2 by jiang1xia, 2018-04-04 (in reply to reply 1)

W5500_IO_BASE is 0, and WIZCHIP_SREG_BLOCK(0) is 1.
1&lt;&lt;3=0x8
So i summed them and get 0x00_0008

### Reply 3 by Eugeny, 2018-04-04

![](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/48.png) jiang1xia:

> WIZCHIP_SREG_BLOCK(N)

Because bits [7:0] of resulting value you have (0x08) correspond to control phase byte, and this byte’s bits [7:3] correspond to field BSB[4:0], and its value of 1 corresponds to the base of socket 0 registers.

---

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