어드레스 접근 문제
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: 어드레스 접근 문제
by palmer ·
스코프로 확인시 어드레스 및 데이터는 16비트로 동작하는게 확인 되었습니다.
uint8 mac[6] = {0x01,0x02,0xDC,0x1E,0x5E,0x0E}; // for setting SHAR register
uint8 addr[6]= {0,0,0,0,0,0};
vPrintf(UART1_SERIAL, “Write : %02x:%02x:%02x:%02x:%02x:%02x\r\n”, mac[0],mac[1],mac[2],mac[3],mac[4],mac[5]);
setSHAR(mac);
getSHAR(addr); // get source hardware address
vPrintf(UART1_SERIAL, “Read : %02x:%02x:%02x:%02x:%02x:%02x\r\n”, addr[0],addr[1],addr[2],addr[3],addr[4],addr[5]);
이렇게 사용하면
Read : dc:1e:dc:1e:5e:0e
이렇게 읽힙니다.
IINCHIP_WRITE(SHAR2,((uint16)mac[2]<<8)+mac[3]);
addr[0] = (uint8)(IINCHIP_READ(SHAR)>>8);
vPrintf(UART1_SERIAL, “Read : %02x:%02x:%02x:%02x:%02x:%02x\r\n”, addr[0],addr[1],addr[2],addr[3],addr[4],addr[5]);
addr[1] = (uint8)IINCHIP_READ(SHAR);
vPrintf(UART1_SERIAL, “Read : %02x:%02x:%02x:%02x:%02x:%02x\r\n”, addr[0],addr[1],addr[2],addr[3],addr[4],addr[5]);
addr[2] = (uint8)(IINCHIP_READ(SHAR2)>>8);
vPrintf(UART1_SERIAL, “Read : %02x:%02x:%02x:%02x:%02x:%02x\r\n”, addr[0],addr[1],addr[2],addr[3],addr[4],addr[5]);
addr[3] = (uint8)IINCHIP_READ(SHAR2);
vPrintf(UART1_SERIAL, “Read : %02x:%02x:%02x:%02x:%02x:%02x\r\n”, addr[0],addr[1],addr[2],addr[3],addr[4],addr[5]);
IINCHIP_WRITE(SHAR4,((uint16)mac[4]<<8)+mac[5])
addr[4] = (uint8)(IINCHIP_READ(SHAR4)>>8);
vPrintf(UART1_SERIAL, “Read : %02x:%02x:%02x:%02x:%02x:%02x\r\n”, addr[0],addr[1],addr[2],addr[3],addr[4],addr[5]);
addr[5] = (uint8)IINCHIP_READ(SHAR4);
vPrintf(UART1_SERIAL, “Read : %02x:%02x:%02x:%02x:%02x:%02x\r\n”, addr[0],addr[1],addr[2],addr[3],addr[4],addr[5]);
Write : 01:02:dc:1e:5e:0e
Read : 01:00:00:00:00:00
Read : 01:02:00:00:00:00
Read : 01:02:dc:00:00:00
Read : 01:02:dc:1e:00:00
Read : 01:02:dc:1e:5e:00
Read : 01:02:dc:1e:5e:0e
이렇게 정상적으로 읽힙니다.
레지스터에 1번 접근하고 다음 레지스터에 접근할 때의 문제 일까요?