@ke4pjw said:
Such a simple little fix. I created a new method to see if the socket was disconnected. I just check it after every packet is sent in a TCP connection. If it returns True, close your file and open the listener again.
pub isdisconnected(socket) : rtv
if (readreg(REG_Sn_IR,socket,1,@REGBUFFER) & Sn_IR_DISCON) == Sn_IR_DISCON
return True
else
return False
I have found an issue where shared hubram between cogs can cause issues with the W6100dvr.spin2 driver. This appears to be obvious now, but never manifested itself as a bug until recent testing revealed it. Specifically, these relate to the following variables:
REGBUFFER - Fixed
TX_WR - Fixed
RX_RD - Open
RX_RSR - Open
Fix is incoming shortly. It will not require any user code to be changed, just the W6100dvr.spin2 file needs to be updated.
Sorry for the delay in posting this update. Version 1.5 has been released and resolves the issue of corruption of data when multiple cogs access the W6100.
FYI: I have found an issue with my code using the Spinner Edge/Wiznet W6100. When using SPI mode and multiple COGs, (both the SPI and W6100 driver are cogless), when the the 2nd COG starts communicating with the Wiznet one or both COGS would stall. I found that I had not inverted the CS pin with a WRPIN ##$00004000,#CSn . By inverting the pin config and swapping PINH and PINL in code, it solved this contention. I still find it strange, as the lock check/release are before and after the pins are toggled. I recall having the same issue with the control lines for parallel mode.
Version 1.6 will solve the multi-cog SPI problem and will introduce better timeout options for listeners and RX methods. I hope to get it out the door this weekend.
I will release version 1.6.0 soon. I need to build more hardware to test with, as the only remaining Spinner Edge I have is being used to run an old school BBS on my Tandy Color Computer with the P2 acting as an emulated 6551 and real time clock.
1.6.0 will include better timeout options for listeners and RX methods.
Comments
You can simplify this to:
In Spin the result of a comparison operator is True or False
I did not know you could do that. Cool!
I have found an issue where shared hubram between cogs can cause issues with the W6100dvr.spin2 driver. This appears to be obvious now, but never manifested itself as a bug until recent testing revealed it. Specifically, these relate to the following variables:
REGBUFFER - Fixed
TX_WR - Fixed
RX_RD - Open
RX_RSR - Open
Fix is incoming shortly. It will not require any user code to be changed, just the W6100dvr.spin2 file needs to be updated.
--Terry
Sorry for the delay in posting this update. Version 1.5 has been released and resolves the issue of corruption of data when multiple cogs access the W6100.
Let me know if it causes you any issues.
--Terry
FYI: I have found an issue with my code using the Spinner Edge/Wiznet W6100. When using SPI mode and multiple COGs, (both the SPI and W6100 driver are cogless), when the the 2nd COG starts communicating with the Wiznet one or both COGS would stall. I found that I had not inverted the CS pin with a
WRPIN ##$00004000,#CSn
. By inverting the pin config and swapping PINH and PINL in code, it solved this contention. I still find it strange, as the lock check/release are before and after the pins are toggled. I recall having the same issue with the control lines for parallel mode.Version 1.6 will solve the multi-cog SPI problem and will introduce better timeout options for listeners and RX methods. I hope to get it out the door this weekend.
--Terry
I released version 1.5.1 which solved the issue with multiple cog access to the W6100 using SPI. It is available here:
https://griswoldfx.visualstudio.com/Spinner Edge/_git/Software
I will release version 1.6.0 soon. I need to build more hardware to test with, as the only remaining Spinner Edge I have is being used to run an old school BBS on my Tandy Color Computer with the P2 acting as an emulated 6551 and real time clock.
1.6.0 will include better timeout options for listeners and RX methods.