View previous topic :: View next topic |
Author |
Message |
katipefendi
Joined: 24 Oct 2013 Posts: 30
|
Posted: Sat Jul 14, 2018 12:06 am Post subject: I think, Config TCP is not confortable with W5500 |
|
|
Hi all,
i try to use the code from Atilio Mosca [url] https://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=13767&highlight=dhcp [/url]
it is works but only till SETTCP.
After then i have to disconnect and connect the Wire to Cs = PORTB.4. then it works.
Has anybody an idea, why this it is so?
My Config see below:
Code: |
Config Spi = Hard , Interrupt = Off , Data Order = Msb , Master = Yes , Polarity = Low , Phase = 0 , Clockrate = 4 , Noss = 0
Spiinit
Config Tcpip = Noint , Mac = 0.8.220.77.05.30 , Ip = Ip_ , Submask = Subnetmask_ , Gateway = Gateway_ , Localport = 2005 , Chip = W5500 , Spi = 1 , Cs = Portb.4
|
|
|
Back to top |
|
|
plouf
Joined: 19 Jan 2012 Posts: 78 Location: Athens,Greece
|
Posted: Sat Jul 14, 2018 5:34 am Post subject: |
|
|
whats the reason of Cs = Portb.4 ? as i see you use a single hardware SPI
try removing it from config |
|
Back to top |
|
|
katipefendi
Joined: 24 Oct 2013 Posts: 30
|
Posted: Sat Jul 14, 2018 11:06 am Post subject: |
|
|
Not works
Code: |
Config Tcpip = Noint , Mac = 0.8.220.77.05.30 , Ip = 192.168.178.77 , Submask = 255.255.255.0 , Gateway = 192.168.178.1 , Localport = 2005 , Chip = W5500 , Spi = 1
|
Is it Possible the Cs = PORT.4 with BASCOM to disconnect and connect again? |
|
Back to top |
|
|
plouf
Joined: 19 Jan 2012 Posts: 78 Location: Athens,Greece
|
Posted: Sat Jul 14, 2018 12:09 pm Post subject: |
|
|
dont understand !
now it works or not ?
C(hip)S(elect) reason is if you have more that 1 conected |
|
Back to top |
|
|
katipefendi
Joined: 24 Oct 2013 Posts: 30
|
|
Back to top |
|
|
plouf
Joined: 19 Jan 2012 Posts: 78 Location: Athens,Greece
|
Posted: Sat Jul 14, 2018 6:39 pm Post subject: |
|
|
i have try here DHCP for 5100 works, then recompile for 5500 and replace chip.... not working
ALSO i have hard time getting my project with 5500 working back .. seems that W5500 lib have some glitches for sure
(i did some test with 5500 since you asked these to check out) |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Sat Jul 14, 2018 9:51 pm Post subject: |
|
|
Im using W5500 without any problems. Look on the attached pics. One is original (bought in Poland ~20$), second is from China 4,7$
They both work...same
Because my Bascom programmed devices have settings for ETH stored in the eeprom Im using this following steps:
1.First of all Im configuring pin SS of hardware SPI as output and set it HIGH(mandatory to be output, set HI is because Im using this pin for CS).
2.Configure Hardware SPI as Master with NOSS = 1 (it means "no ss")
3.Then I configure Wizz with my chosen CS pin. Pin can be same as original SS pin or any other. If another pin is used then I configure it as Output first and set it High.
-Important (for me)-step is that I configure WIzz with parameter Noinit
This is decribed in the Help. So I must complete/can change configuring by Settcp later.
With this order everything works fine for me. I can change settings almost in the fly by sending AT commands.
I also store once sent settings in the eeprom so next boot is quicker.
So ->NOSS=1 ->Noinit parameter ..and when you have alias for the Wizz CS pin then you can use it anytime you want. |
|
Back to top |
|
|
katipefendi
Joined: 24 Oct 2013 Posts: 30
|
Posted: Sat Jul 14, 2018 10:54 pm Post subject: |
|
|
Yes, TCP is not Problem, the Problem is, if you use the UDP |
|
Back to top |
|
|
EDC
Joined: 26 Mar 2014 Posts: 971
|
Posted: Sat Jul 14, 2018 10:56 pm Post subject: |
|
|
Okay. I will test it tommorow. Im curious |
|
Back to top |
|
|
katipefendi
Joined: 24 Oct 2013 Posts: 30
|
Posted: Sun Jul 15, 2018 12:47 am Post subject: |
|
|
If i use UDP, then I measure the following first picture on the PIN Cs
and
if i use TCP, then I measure the following second picture on the PIN Cs |
|
Back to top |
|
|
six1
Joined: 27 Feb 2009 Posts: 553
|
Posted: Thu Aug 23, 2018 7:34 am Post subject: |
|
|
@Mark
can you confirm, that DHCP Sample isn't working on WIZ5500 ?
best, Michael _________________ For technical reasons, the signature is on the back of this message. |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5921 Location: Holland
|
Posted: Thu Aug 23, 2018 9:29 am Post subject: |
|
|
no, i did not test it on all supported wiz chips. So i can not confirm if it works or not.
it should work but since wiznet makes each new chip totally different, it would not surprise me if there is some difference.
A csw_reset (soft chip reset) is executed, it should be sufficient. _________________ Mark |
|
Back to top |
|
|
six1
Joined: 27 Feb 2009 Posts: 553
|
Posted: Thu Aug 23, 2018 3:36 pm Post subject: |
|
|
thank you Mark!
@katipefendi
check hint from Mark! (csw_reset) _________________ For technical reasons, the signature is on the back of this message. |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5921 Location: Holland
|
Posted: Thu Aug 23, 2018 9:16 pm Post subject: |
|
|
I connected the w5500 and while the provided samples work, indeed the Settcp hangs the chip.
After checking it seems that the w5500 register does not reset properly.
According the datasheet : If this bit is ‘1’, All internal registers will be initialized. It will be
automatically cleared as ‘0’ after S/W reset.
So at init and re init the bit is set, then there is a check to see if the bit clears. With a hard reset this seems to work, while with a soft reset, it doesnt.
To fix it, you can remark these lines in the tcpip-w5500.LBX file (open with nodepad)
Search the label _Re_init_tcpip_lp: and remark the lines as shown :
_Re_init_tcpip_lp:
; rcall _read_TCPSPIX
;.OBJ FCD7
; rjmp _Re_init_tcpip_lp
then save. _________________ Mark |
|
Back to top |
|
|
six1
Joined: 27 Feb 2009 Posts: 553
|
Posted: Fri Aug 24, 2018 9:57 am Post subject: |
|
|
Thanks a lot Mark! _________________ For technical reasons, the signature is on the back of this message. |
|
Back to top |
|
|
|