---
title: "void W5500_Init() 함수에서 memsize 배열 초기값 의미가 뭔가요?"
url: "https://maker.wiznet.io/forum/15441"
markdown_url: "https://maker.wiznet.io/forum/15441/md"
type: "Forum topic"
category: "IO Modules"
author: "yoonsunkkim"
created: "2024-12-25T16:49:43+09:00"
last_activity: "2024-12-25T16:57:22+09:00"
language: "en"
views: 2
replies: 0
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# void W5500_Init() 함수에서 memsize 배열 초기값 의미가 뭔가요?

## Question

Asked by yoonsunkkim on 2024-12-25 in IO Modules.

w5500evb 데모 코드에서 W5500_Init() 함수에서 wizchip 초기화할 때 사용하는 memsize 배열의 초기값이 2 인 이유가 있나요? memsize 배열 크기가 2x8인 이유도 알고 싶습니다.

==================================

void W5500_Init()
{
uint8_t tmp;
uint8_t memsize[2][8] = { { 2, 2, 2, 2, 2, 2, 2, 2 }, { 2, 2, 2, 2, 2, 2, 2, 2 } };

Chip_GPIO_SetPinState(LPC_GPIO, 0, 2, true); // SSEL(CS)

Chip_GPIO_SetPinState(LPC_GPIO, 0, 22, false); // N_RESET
tmp = 0xFF;
while(tmp--);
Chip_GPIO_SetPinState(LPC_GPIO, 0, 22, true); // N_RESET

reg_wizchip_cs_cbfunc(wizchip_select, wizchip_deselect);
reg_wizchip_spi_cbfunc(wizchip_read, wizchip_write);

/* wizchip initialize*/
if (ctlwizchip(CW_INIT_WIZCHIP, (void*) memsize) == -1) {
printf("WIZCHIP Initialized fail.\r\n");
while (1);
}
/*
do {
if (ctlwizchip(CW_GET_PHYLINK, (void*) &tmp) == -1)
printf("Unknown PHY Link stauts.\r\n");
} while (tmp == PHY_LINK_OFF);
*/
}

---

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