W5100의 통신이 끊어지는 현상
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: W5100의 통신이 끊어지는 현상
by Sang Mun Lee ·
감사합니다.
제가 DSP28335 의 SPI 클럭을 10MHZ 이상으로 해서 W5100과 IP 주소를 쓰고 다시 읽으니 쓰레기 값이 들어오더라구요.
SPI 클럭을 10MHZ 이상 올리지를 못하겠네요.
10MHz 클럭으로 전송 시 이더넷 통신속도가 1.5Mbps가 나오던데요.
전송속도를 올리는 스킬이 있는지요?
저는 wiznet git에 있는 W5100_ATMega_WEBSERV-master 소스를 수정하여 사용하고 있습니다.
send 함수를 수정하여 다음과 같이 수정하였습니다.
DSP 28335의 메모리 특성상 16bit 메모리로 고정이 되어 기존의 send()함수를 사용하지 못하고 수정하였습니다.
Uint8 Send16(Uint8 sock, const Uint16 *buf, Uint16 buflen)
{
Uint16 ptr;
Uint16 offaddr;
Uint16 realaddr;
Uint16 txsize;
Uint16 timeout;
Uint16 sockaddr;
// Uint16 DMASendFlagState;
// DELAY_US(10);
txsize = W51_read(sockaddr+W5100_TX_FSR_OFFSET); // make sure the TX free-size reg is available
txsize = (((txsize & 0x00FF) << 8 ) + W51_read(sockaddr+W5100_TX_FSR_OFFSET + 1));
if (timeout++ > 1000) // if max delay has passed…
{
DisconnectSocket(sock); // can’t connect, close it down
return W5100_FAIL; // show failure
}
}
// Read the Tx Write Pointer
ptr = W51_read(sockaddr+W5100_TX_WR_OFFSET);
offaddr = (((ptr & 0x00FF) << 8 ) + W51_read(sockaddr+W5100_TX_WR_OFFSET + 1));
while (buflen)
{
buflen–;
realaddr = W5100_TXBUFADDR + (offaddr & W5100_TX_BUF_MASK); // calc W5100 physical buffer addr for this socket
// return DMA_OVERFLOW;
}
}
}
위와 같이 수정하여 전송하면 전송속도가 1.5Mbps가 최고이더라구요. ㅠ ㅠ
전송 속도를 올릴 수 있는 방법이 있는지요?