W5300 problem in sending TCP packets to PC
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: W5300 problem in sending TCP packets to PC
by Eugeny ·
Do you mean you send packet from W5300 to PC?
As long as it seems packet reaches PC we can deem than all the networking registers are set properly. And the issue is in contents of the packet, thus in the contents of the W5300 TX buffer.
You must check if you -
RE: RE: W5300 problem in sending TCP packets to PC
by javad2040 ·
thank you for reply.
I set all register properly and received packet by FPGA is correct, but received packet by PC is not correct.
Also i check all register and buffer addresses that they are sets correctly, but the problem is exist.
I guess the problem is related to Chip, since i use “How_to_Test_Internal_TX_RX_Memory” document that the testing of TX-FIFO is fails.
please help me to solve this problem.
RE: W5300 problem in sending TCP packets to PC
by Eugeny ·
Change your code to test RX-FIFO. Will it fail too?
It would help if you have another board on hand to test your code and see if that another board also fails the test.
RE: W5300 problem in sending TCP packets to PC
by javad2040 ·
I test TX_FIFO and RX_FIFO by sending and receiving data form FPGA that they works correctly.
I don’t another boar for test my code but i decide to change the chip and replace it with another.
have you any suggestion for solving the my problem?
RE: RE: W5300 problem in sending TCP packets to PC
by Eugeny ·
But one post before you said
Can you explain please?
RE: W5300 problem in sending TCP packets to PC
by javad2040 ·
For resetting the chip two ways is exist :
1) use reset pin that is hardware reset.
2) use MR(RS) reg that is software reset.
I founded that the chip first should be reset by hardware reset(reset pin) and after initialization it will be ready to use.
Also i founded that for testing the internal Memory, i should used the MR(RS) reg for resetting the chip and FIFO .
In previous testing i forgot reset the chip by MR(RS) reg and i used only reset pin that result the testing of TX_FIFO was failure but RX_FIFO was successful.
In last testing after reset the chip by reset pin, i use MR(RS) reg for reset the FIFO that the testing of both FIFO was successful.
Also i use both manner of resetting, but the PC received the incorrect data that seems the TX_FIFO whether gets dummy values or has fixed values that related to the resetting and initialization.
I confused that why TX_FIFO can’t send correct data to PC, since the testing is correct but sending data to PC is fails.
RE: W5300 problem in sending TCP packets to PC
by Eugeny ·
Let’s consider the whole environment. To achieve result you do the following:
You should check each stage:
RE: W5300 problem in sending TCP packets to PC
by javad2040 ·
hi.
Dear “Eugeny” thank you for helping.
I Checked the Register’s Data carefully and i founded that MTYPER reg (specially TX_FIFO ) is not set correctly, i set it correctly and the problem solved but new problem is appears.
I send 512 byte data from PC to W5300 that it saved to FPGA correctly but when read it from w5300, the two first of received data is zero or dummy value. I set the registers according below:
RMS01R_Data := X"0040";
RMS23R_Data := X"0000";
RMS45R_Data := X"0000";
RMS67R_Data := X"0000";
TMS01R_Data := X"0040";
TMS23R_Data := X"0000";
TMS45R_Data := X"0000";
TMS67R_Data := X"0000";
MTYPER_Data := X"00FF";
I use Socket 1, direct mode, 16 bit data bus, big-endian, TCP Server mode, TX and RX FIFO is 64KB.
Also i set MSSR(MTU) reg to 1460 byte but the new problem exist.
can you help me to solve it?
RE: W5300 problem in sending TCP packets to PC
by Eugeny ·
Did you see figure 11 on the page 96 of datasheet? It says that first two bytes might be the packet-info (data size).
RE: W5300 problem in sending TCP packets to PC
by javad2040 ·
yes i saw the figure and use the S1_MR(Align) and S1_RX_RSR for receiving the Data only.
The received data by FPGA is true but when the same data sent to PC, the two first byte is added to data that i force read (2+data) bytes for retrieve the data.
RE: W5300 problem in sending TCP packets to PC
by Eugeny ·
Two things you need to check:
RE: W5300 problem in sending TCP packets to PC
by dehghan ·
Hi javad2040
I have problem something like you the send data to PC is correct but when I send data from PC to w5300 the data is incorrect .
I want to know how you solve your problem?
Regards. Dehghan
RE: RE: W5300 problem in sending TCP packets to PC
by javad2040 ·
Hi dehghan
please explain more about your problem.