Problem in programming
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: Problem in programming
by Eugeny ·
You need to give background: when you write, what you write, what hardware platform you use.
It is not correct that you can not read GAR back, but it may happen because you do something in wrong time.
[quote=“kavireloot”]2. i have written in below registers for Ping command is it enough or i have to wrote in other registers ?
This is wrong.
should be the first step, not the last. When you perform reset on the chip all settings you set before are cleared. You also should ensure you set PB bit in MR register for ping to work.
RE: Problem in programming
by kavireloot ·
Thanks for your attention.
My mcu is STM32f103xx
This is my code :
Is it wrong?
RE: Problem in programming
by Eugeny ·
Logically it is correct. How do you define constants and arrays?
W5100_MODE=?
MODE_RST=?
W5100_SHAR=?
Phy_Addr=?
W5100_GAR=?
Gateway_IP=?
W5100_SUBR=?
Sub_Mask=?
W5100_SIPR=?
IP_Addr=?
W5100_IMR=?
W5100_RMSR=?
W5100_TMSR=?
W5100_RTR=?
W5100_RTR=?
W5100_RCR=?
What is the code of Write_W5100()?
Where failure in this code occurs giving you unexpected result, what is wrong result and what is expected result?
RE: Problem in programming
by kavireloot ·
For example:
when i write 0xaa in RMSR register i can read it (0xaa)
but when i write 192 in W5100_GAR register i cant read it and i receive 0…
RE: Problem in programming
by Eugeny ·
[quote=“kavireloot”]
unsigned char Phy_Addr[6]={0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };[/quote]
Try different one:
RE: Problem in programming
by kavireloot ·
Is the other code correct?
RE: Problem in programming
by Eugeny ·
Well, I do not see SPI clock in the code, thus it is not possible to check if SPI communication is correct. However as you say you get AA back, we assume SPI protocol works. There’s one issue though. You write 80 into mode register, signalling W5100 to reset, but do not wait for its reset completion. Before doing anything else you should ensure that bit 7 is 0 = reset complete.
RE: Problem in programming
by kavireloot ·
hi
thanks for your helping.
i have done the ping command and its works well.