W5500 stuck on Socket Close Function - while( getSn_CR(sn) )
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 stuck on Socket Close Function - while( getSn_CR(sn) )
by Eugeny ·
Prove that SPI communication functions properly by reading VERSIONR register and getting 0x01, 0x02, 0x03 and 0x04.
RE: RE: W5500 stuck on Socket Close Function - while( getSn_CR(sn) )
by ClariceStarling ·
This is the SPI timing for tihs code its okay for chip version! But what is the problem
RE: W5500 stuck on Socket Close Function - while( getSn_CR(sn) )
by Eugeny ·
What is the value of
snhere? Not the one you may think of, but real value reported by the MCU?RE: RE: W5500 stuck on Socket Close Function - while( getSn_CR(sn) )
by ClariceStarling ·
sn = 0;
But reading the version of chip
register level code returns 0x04. It ok as you can see in my previous message (Logic Analyzer)
But this function returns 0x01 → chipVersion = getVERSIONR();
Is this a SPI function problem ?
RE: W5500 stuck on Socket Close Function - while( getSn_CR(sn) )
by Eugeny ·
Then look at what is going on the bus when you perform this call. Did you select the right chip within the library?
RE: W5500 stuck on Socket Close Function - while( getSn_CR(sn) )
by ClariceStarling ·
Yes there is W5500. Its ok.
RE: W5500 stuck on Socket Close Function - while( getSn_CR(sn) )
by ClariceStarling ·
Oh my god what is this function?
this function cannot read the last byte ( chipVersion = getVERSIONR(); )
RE: RE: W5500 stuck on Socket Close Function - while( getSn_CR(sn) )
by Eugeny ·
Your definition is framed within
#ifndef. You are not guaranteed to have exactly this value defined if it was defined somewhere else beforehand. Dig into library and put diagnostic outputs into its flow to prove it does required thing.RE: W5500 stuck on Socket Close Function - while( getSn_CR(sn) )
by ClariceStarling ·
I did but there is no change
RE: W5500 stuck on Socket Close Function - while( getSn_CR(sn) )
by Eugeny ·
If you’d do this (second thing I said) you’d know how
getVERSIONR();works for you, what it does, and where’s a problem.RE: W5500 stuck on Socket Close Function - while( getSn_CR(sn) )
by ClariceStarling ·
Something feels wrong in the library.
I think the SPI buffer is not being cleared.
That’s why I cleaned it by reading after each sending process.
I can connect now!
But a new problem arose.
When I send data with the send function after the connection process, the data is sent only once. When I want to send it later, the send function returns the following value
#define SOCKERR_SOCKSTATUS (SOCK_ERROR - 7) ///< Invalid socket status for socket operation.
RE: W5500 stuck on Socket Close Function - while( getSn_CR(sn) )
by Eugeny ·
What does it mean “later”? What status the socket has when this “later” happens?
RE: W5500 stuck on Socket Close Function - while( getSn_CR(sn) )
by ClariceStarling ·
sorry for wrong explanation
It sends data only once, but when I try to send it a second time, it gives the -7 error.