w5500 인터럽트 레지스터 설정 과 예제에 대한 질문 드립니다
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: w5500 인터럽트 레지스터 설정 과 예제에 대한 질문 드립니다
by Edward ·
안녕하세요.
저희 ioLibrary는 사용하지 않고 직접 드라이버 포팅을 하신건가요??
아래 URL은 저희가 제공드리는 W5500 드라이버 소스입니다.
github.com/Wiznet/ioLibrary_Driver
여기서 application/loopback 폴더로 가시면 udp예제가 있습니다.
확인 부탁드립니다.
감사합니다.
RE: w5500 인터럽트 레지스터 설정 과 예제에 대한 질문 드립니다
by deepsleep22 ·
답변 감사합니다.
ioLibrary 을 사용하여 드라이버단을 작성하였습니다.
말씀하신 application/loopback 의 loopback_udps 함수는 nINT 핀을 사용한것이 아닌 매번 레지스터를 검사해야하는 함수 아닌가요?
저는 nINT 을 사용하여 udp를 수신하는 예제가 필요합니다.
RE: w5500 인터럽트 레지스터 설정 과 예제에 대한 질문 드립니다
by Edward ·
안녕하세요.
W5500의 경우 소켓전용 인터럽트 레지스터가 따로 존재합니다.
W5500의 경우 UDP든 TCP든 데이터를 수신하면 자동적으로 소켓 레지스터가 동작하게 됩니다. (Sn_IR)
그래서 사용자는 수신한 데이터를 가져오고 Sn_IR 레지스터를 Clear시켜줘야 합니다.
아래는 W5500 데이터 시트입니다. 여기서 47페이지 Sn_IR부분을 참조해주세요.
wizwiki.net/wiki/lib/exe/fetch.p … 160223.pdf
따로 예제는 제공드리지는 않지만, 위 부분은 Loopback의 함수에도 존재합니다.
udp 부분이 아닌 tcp 부분을 봐주세요.
loopback_tcps 코드에서 아래와 같은 코드 부분이 있습니다.
보시면 Sn_IR 레지스터를 읽어서 사용하고 그리고 중간에 setSn_IR(sn,Sn_IR_CON); 를 해줘서 인터럽트 클리어를 해주게 됩니다.
따라서 아래와 같은 방법으로 사용하시면 됩니다.
switch(getSn_SR(sn))
{
case SOCK_ESTABLISHED :
if(getSn_IR(sn) & Sn_IR_CON)
{
#ifdef LOOPBACK_DEBUG
getSn_DIPR(sn, destip);
destport = getSn_DPORT(sn);
#endif
setSn_IR(sn,Sn_IR_CON);
감사합니다.