W5100 UDP pings but doesn't send data
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 UDP pings but doesn't send data
by Eugeny ·
What is MAC address exactly? You shown values for everything except this information.
Of these “couple of times”, did you have correct data arrived? With only two bytes FF FF in packet data field?
What you can do now
RE: RE: W5100 UDP pings but doesn't send data
by Bob Black ·
Thank you for your reply.
Sorry, didn’t think it mattered. I tried different values, now it’s: aa:bb:cc:dd:ee:ff.
Yes, exactly two bytes that i’ve sent.
When I connect directly I only get responses to ping requests from pc, there are no any other packages coming from w5100 device (except for those couple of lucky packages).
I drive w5100 with FPGA - Kintex-7 of Xilinx (maybe unconventional way to affect chip, but it wasn’t up to me to choose). Anyway, my code is on VHDL (excuse me, not good at this, I’m more cpp guy)
Summary
– functions of wr/rd to registers work fine
VARIABLE source_port : std_logic_vector(15 downto 0) := x"07D0";
begin–p1 process
if (reset = ‘1’) then
nWR <= Inactive;
nRD <= Inactive;
nCS <= Inactive;
done <= ‘0’;
read_data <= x"00";
cnt := 0;
step_of_progr <= 1;
memcpy_fl := false;
step_of_memcpy <= 0;
mem_addrA_sign <= x"0000";
mem_data_inA_sign <= x"00";
NUM_OF_TRIES := 0;
–=======================================================================
–=============SENDING PROCESS → 4 stage==========================-------
–=======================================================================
– check FRee memory size
elsif (step_of_progr = start_4_stage) then
cnt := cnt + 1;
SetAdr_AINC(cnt, S0_TX_FSR_0);–set adr to read
–
– ============ REading S0_TX_WR =======
elsif (step_of_progr = (start_4_stage + 12 + 7)) then
cnt := cnt + 1;
SetAdr_AINC(cnt, S0_TX_WR_0);–set address to read
–
– --==== /* calculate offset address */ ======
elsif (step_of_progr = (start_4_stage + 15 + 7)) then --0x57
cnt := cnt + 1;
temp_16 := x"001B"; – TMSR
SetAdr_AINC(cnt, temp_16);–set address to read
–
– /* calculate start address(physical address) */ ==
elsif (step_of_progr = (start_4_stage + 18 + 7)) then
gS0_TX_BASE := chip_base_address + TX_memory_base_adr;
get_start_address := gS0_TX_Base + get_offset;
get_start_address_vect := std_logic_vector(to_unsigned(get_start_address, get_start_address_vect’length));
step_of_progr <= step_of_progr + 1;
– – /* if overflow socket TX memory */ –
elsif (step_of_progr = (start_4_stage + 19 + 7)) then
step_of_progr <= start_4_stage + 21 + 7;
–
–======= Complete Sending? ============
– If (Sn_CR == 0x00) transmission is completed. –
elsif (step_of_progr = (start_4_stage + 30 + 7)) then
cnt := cnt + 1;
SetAdr_AINC(cnt, S0_CR);–set addr to read
RE: W5100 UDP pings but doesn't send data
by Eugeny ·
I am not sure I am going to read and trace it. Why not use
casestatement for state machine? What you currently have is totally non-readable. I bet you simply mess state of the machine during operation.Where’s waiting for MR’s bit 7 to become 0? What is the purpose of
cnt?RE: W5100 UDP pings but doesn't send data
by Bob Black ·
I agree that the code is difficult to read, but on time diagrams it’s more obvious, that it writes into registers fine, and reads what is expected.
I check MR right after reset, and it’s zero. No need to wait. Besides, there is expected value in status register after initialization, so the problem at least is not before that.
That’s all you can help me with?
RE: W5100 UDP pings but doesn't send data
by Eugeny ·
Make a dump of states machine passes through. Thus should be the easiest thing to do on your code. After dump you look into the states, and ensure that the sequence is correct.
RE: W5100 UDP pings but doesn't send data
by Bob Black ·
Thank you, problem is solved. Turned out a time delay was needed between chip initialization and sending procedure. For some reason chip couldn’t send data right after initialization