Overview Features Coding ApolloOS Performance Forum Downloads Products Order Contact

Welcome to the Apollo Forum

This forum is for people interested in the APOLLO CPU.
Please read the forum usage manual.
Please visit our Apollo-Discord Server for support.



All TopicsNewsPerformanceGamesDemosApolloVampireAROSWorkbenchATARIReleases
Questions and Answers for AMIGA Workbench or Coffin

Problem With SDNet Device, Eating >90% CPU

Tygre Chingu

Posts 32
09 Jan 2020 00:01


Hi all!

I have this wonderful Vampire in my A600 and it works like a charm, except for the network.

I have a Vampire V600 with the Arananet module. "VControl BO CO" outputs:

Product-ID:    0x01
Product-Name:  Vampire V600
Serial-Type:  0x14
Serial-Number: 0X563C41006400B806-2
Port Unit #0:  Not allocated.
Port Unit #1:  Not allocated.
Vampire V600-128 Apollo rev 5851 x11 c7gk (gold2.11)

I have MiamiDX, Executive. I run "Top" in my WBStartup so I see which tasks are running and the CPU. I have installed SAGADriver.v1.7.1.lha and used both sdnet.device v1.95beta and v2.4 (the version coming in this SAGADriver archive).

What happens: after switching on my Amiga, sometimes the network works like a charm but, more often than not, after some random amount of time/activity on the network (IBrowse/smbfs), the network connection will "freeze" (any access stops) and the sdnet.device steadily increases its CPU consumption from (the usual) 2% to >90%.

Has anyone had the same problem? Any idea what could be wrong in my hardware/software configuration?

Cheers!


Vojin Vidanovic
(Needs Verification)
Posts 1916/ 1
09 Jan 2020 01:10


See does everything match to expected
https://wiki.apollo-accelerators.com/doku.php/system_tools:ethernet


Nixus Minimax

Posts 416
09 Jan 2020 08:36


I have no idea whether this is related but I remember that there were problems with Executive which seems to be a rather b0rken patch. Better try without.



Tygre Chingu

Posts 32
11 Jan 2020 02:51


Hi Vojin and Nixus!

Thank you for your answers!

However, I still have the same problem. First, I double-checked that Executive wasn't running (it wasn't). Second, I tried to use v2expeth.device but MiamaDx cannot configure it. In Miami, I can put v2expeth.device instead of sdnet.device and I can query the MAC address of the Arananet hardware. But, when I want to start the connection, Miami replies:

"Error (3,1) trying to configure the sana-ii device."

So, currently I cannot use v2expeth.device and sdnet.device blocks the connection and eats all the CPU after a (short) while.

Am I doing something wrong? I could find others with the same Miami error but with the PlipBox and its reset signal (https://github.com/cnvogelg/plipbox/issues/6).

Best!


Henryk Richter
(Apollo Team Member)
Posts 128/ 1
11 Jan 2020 08:19


In my experience, the most common cause of instability with SDNet is inappropriate cabling. Please keep the cable from the SD connector to the Ethernet module as short as possible and make sure that the Dupont plugs sit tight. Also, early V600's have suboptimal power regulation. Some time ago, there were some guides posted for improved power stability of early V600 cards.

There is a catch with the ENC28J60 chipset, though. The reason why you can find similar errors for plipbox stems from an inherent design flaw of said chipset. It interprets a single received 0xFF byte in command mode as "chip reset command", thus forgetting all settings. I've put a considerable amount of work into the detection of such conditions and associated recovery procedures.

Again, make sure to use short cables with steady connectors in order to avoid ENC28J60 chipsets resetting on their own.

Depending on core speed, it might be worthwhile to lower the SPI clock rate. A test tool is part of the files I've provided alongside the sources (sdnettest). Sources, documentation and binaries can be found here: EXTERNAL LINK  (the other drivers in that repository are for a Zorro card and won't apply to the ports on Vampire cards)

The correct driver for modules connected to the SD port of Vampire cards is sdnet.device. v2expeth applies to the expansion connector of V500 and V1200 cards only.




Tygre Chingu

Posts 32
12 Jan 2020 21:26


Hi Henryk and thank you for your help!
 
  As far as I can tell, the Dupont plugs are set correctly, the cables measure about 10cm long, is that okay?
 
  I set SPISPEED=1 and run the sdnettest and it says that everything is likely to work fine.
 
  Still, I have the same problems (frozen connection, >90% CPU)... could you point me to the posts about improving power stability? (Sorry, I couldn't find them, probably looked for the wrong keywords.)
 
  Best!

UPDATE: I also tried another PSU, same behaviour...


Henryk Richter
(Apollo Team Member)
Posts 128/ 1
15 Jan 2020 10:26


Tygre Chingu wrote:

  As far as I can tell, the Dupont plugs are set correctly, the cables measure about 10cm long, is that okay?

Yes, this length of the cables should not be in a suitable range. Maybe you can find better connectors, though. At least in the case of the modules I have here, the SDNet breakout sold by Arananet matches the pinout of the ENC28J60. Therefore, a 1:1 flat cable with 2x5 female pins can also be used. These usually have less connection stability woes.

Another approach would be to deliberately use 5V ENC28J60 modules (which have a 3.3V voltage regulator onboard) and connect their 5V input to another power source (like +5V from floppy header). Such an approach might improve the stability of the Ethernet module itself since it no longer shares the 3.3V power with the SDRAM and other components on the Vampire. But I have to place a warning: If wired up wrongly, this method might fry (read: brick) valuable hardware. That's why the documentation says not to do this.


  Still, I have the same problems (frozen connection, >90% CPU)... could you point me to the posts about improving power stability? (Sorry, I couldn't find them, probably looked for the wrong keywords.)

There was a guide at some point (don't have a link, either) how to improve the power regulation on early V600's.

In any case, I've identified some places where the driver might get stuck in an infinite loop in situations where the Ethernet became unresponsive. These infinite loops are fixed in the upcoming v2.6 of the SDNet driver. I can't promise that the recovery procedure to revive unresponsive NICs works in all cases, though.


Tygre Chingu

Posts 32
18 Jan 2020 21:53


Hi Henryk and thank you for your help!

Henryk Richter wrote:

Yes, this length of the cables should not be in a suitable range. Maybe you can find better connectors, though. At least in the case of the modules I have here, the SDNet breakout sold by Arananet matches the pinout of the ENC28J60. Therefore, a 1:1 flat cable with 2x5 female pins can also be used. These usually have less connection stability woes.

I will definitely try this option first! Seems the easiest and safest :-)

Henryk Richter wrote:

In any case, I've identified some places where the driver might get stuck in an infinite loop in situations where the Ethernet became unresponsive. These infinite loops are fixed in the upcoming v2.6 of the SDNet driver. I can't promise that the recovery procedure to revive unresponsive NICs works in all cases, though.

Would you know when you could release the new driver? If you would like me to test them, I'll be happy to help! (You can e-mail me at "tygre at chingu.asia")

Henryk Richter wrote:

Another approach would be to deliberately use 5V ENC28J60 modules (which have a 3.3V voltage regulator onboard) and connect their 5V input to another power source (like +5V from floppy header). Such an approach might improve the stability of the Ethernet module itself since it no longer shares the 3.3V power with the SDRAM and other components on the Vampire. But I have to place a warning: If wired up wrongly, this method might fry (read: brick) valuable hardware. That's why the documentation says not to do this.

Definitely an option that I will consider if everything else fails... I would not want to brick anything...

Cheers!


Tygre Chingu

Posts 32
04 Apr 2020 03:58


Hi all!

Just wanted to thank Henryk!

The problem was indeed that the Vampire + Arananet provide 3.3V (actually, more like 2,8V) to the ENC28J60, instead of the expected +5V.

The solution is to *not* plug the +5V and +3.3V pins on the Arananet to the corresponding pins on the ENC28J60 module and to feed in +5V from the floppy disk (brown wire) to the +5V pin on the ENC28J60 module.

Now the Ethernet connection works perfectly!

Cheers!


Hans-Georg Winkler

Posts 29
30 Jan 2021 15:12


Thank you very much! that answer was a livesaver ;-) I had the same problem and had no idea what was going on because it was working before. I changed the power supply from my Amiga and I guess that was the root cause.

Now I use the 5V from the floppy and the ethernet is working again :-)

posts 10