View previous topic :: View next topic |
Author |
Message |
andro
Joined: 12 Mar 2007 Posts: 94 Location: Ljubljana
|
Posted: Sat Jan 26, 2019 10:55 pm Post subject: Wiznet W5500 ethernet status |
|
|
Hello to everyone!
To be able to indicate the status of PHY, such as duplex, Speed and Link, I Would like to access W5500's PHYCFGR register (0x002E).
Has anyone tried to do that?
Thanks in advance!
Best regards,
Andrej
(BASCOM-AVR version : 2.0.8.1 ) |
|
Back to top |
|
|
andro
Joined: 12 Mar 2007 Posts: 94 Location: Ljubljana
|
|
Back to top |
|
|
andro
Joined: 12 Mar 2007 Posts: 94 Location: Ljubljana
|
Posted: Sun Jan 27, 2019 12:28 am Post subject: |
|
|
It's me again...
Now I got another problem....
This code
Code: | Phy_stat = Gettcpregs(&H2e , 1) |
reads a PHYCFGR register corectly. (I can detect speed, duplex link status)
But it only give a zero value after I perform SOCKETSTAT command.
No idea....
BR
Andrej |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Mon Jan 28, 2019 10:11 am Post subject: |
|
|
you best check with wiznet to see if that is supposed to work that way.
since PHYCFGR is socket independent register i think it should return the right data. no matter the other code. _________________ Mark |
|
Back to top |
|
|
andro
Joined: 12 Mar 2007 Posts: 94 Location: Ljubljana
|
Posted: Sun Feb 03, 2019 11:44 pm Post subject: |
|
|
Hi!
Mark, wrote to Wiznet forum and today I got this reply:
Quote: | Seems that your program reads Reg 0x2E from the socket base instead of the commnon registers (this will return 0x00 Fragment Offset IP Header 1 default). Check the BSB that is sent to the SPI when accessing the REG 0x2E from the socketregister (0x00 @ read or 0x04 @ write to the common registers) |
Does this answer make sens?
Best regards
Andrej |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Mon Feb 04, 2019 11:00 am Post subject: |
|
|
it makes sense.
if you write to support i can send you a modified test version.
i have no 5500 connected at the moment to test.
as a work around you can also add this code before you use gettcpregs :
R0=0
_tcpsock=0
'here the gettcpregs function _________________ Mark |
|
Back to top |
|
|
andro
Joined: 12 Mar 2007 Posts: 94 Location: Ljubljana
|
Posted: Tue Feb 05, 2019 12:22 am Post subject: |
|
|
Hello!
THANKS to MARK for this work-aroud !!!!
It works perfectly now!
Best regards
andrej |
|
Back to top |
|
|
|