stm32계열 cpu로 w5300 direct mode(16bit) 사용중입니다.
아래와 같이 네트웍 설정 후 확인 시 아래와 같이 읽히는데 뭐가 문제일까요??
//////////설정 후 read////////////////
SHAR : b8:00:b8:00:b8:00
GWR : 184.0.184.0
SUBR : 255.255.255.0
SIPR : 184.0.184.0
/////////////////////////////////////소스코드///////////////////////////////
u8 ip[4] = {192, 168, 0, 100};
u8 mac[6] = {0x00, 0x08, 0xdc, 0x00, 0x00, 0x02};
u8 sn[4] = {255, 255, 255, 0};
u8 gw[4] = {192, 168, 0, 254};
void BSP_ETH_Init(void)
{
uint8 tx_mem_conf[8] = {8,8,8,8,8,8,8,8}; // for setting TMSR regsiter
uint8 rx_mem_conf[8] = {8,8,8,8,8,8,8,8}; // for setting RMSR regsiter
W5300_Reset();
W5300_FSMC_Init();
/* initiate W5300 */
iinchip_init();
/* allocate internal TX/RX Memory of W5300 */
if(!sysinit(tx_mem_conf,rx_mem_conf))
{
printf(“MEMORY CONFIG ERR.\r\n”);
while(1);
}
setMR(getMR()|MR_FS); // If Little-endian, set MR_FS.
setSHAR(mac); // set source hardware address
#ifdef DEF_IINCHIP_PPP
if(pppinit((uint8*)“test01”, 6, (uint8*)“pppoe1000”, 9)!=1)
{
printf(“PPPoE fail.\r\n”);
while(1);
}
close(0);
#else
/* configure network information */
setGAR(gw); // set gateway IP address
setSUBR(sn); // set subnet mask address
setSIPR(ip); // set source IP address
#endif
/* verify network information */
getSHAR(mac); // get source hardware address
getGAR(gw); // get gateway IP address
getSUBR(sn); // get subnet mask address
getSIPR(ip); // get source IP address
EthMsg("\r\nSHAR : %02x:%02x:%02x:%02x",mac[0],mac[1],mac[2],mac[3]);
EthMsg(":%02x:%02x\r\n",mac[4],mac[5],0,0);
EthMsg(“\r\nGWR : %d.%d.%d.%d”,gw[0],gw[1],gw[2],gw[3]);
EthMsg(“\r\nSUBR : %d.%d.%d.%d”,sn[0],sn[1],sn[2],sn[3]);
EthMsg(“\r\nSIPR : %d.%d.%d.%d”,ip[0],ip[1],ip[2],ip[3]);