Research question - users with WC32 please read!

If that switch is not making connections sometime, it is better to plug in a switch always making good connection.  
We can not only blame users switches, it could be the RealTek NIC chip having problem sync with some other switch chip. From our experience making network gears, those NIC chips do a lot of handshaking back and forth.  Unfortunately, we do not make the switch nor the RealTek NIC chip used in WC32.  We want to found out why they don't talk to each other, but a lot of times, the easiest way is to swap to a switch talking.
 
CAI_Support said:
We can not only blame users switches, it could be the RealTek NIC chip having problem sync with some other switch chip.
 
Re-posting in here for reference for others....
 
Meantime, I got my nice shiny new Mikrotik CRS226-24-25+RM switches today, and have connected one up.

The results are INTERESTING to say the least.

I have now got a great deal more control over the ports.
For any given port, I can:
 
Enable or disable Auto Negotiation.
If disabled, I can force:
 10Mbps half duplex
 10Mbps full duplex
 100Mbs half duplex
 100Mbs full duplex
 1Gbps half duplex
 1Gbps full duplex
Additionally, I can turn TX flow control on/off/auto
and RX flow control on/off/auto
 
If I turn auto negotiation off, I cannot get *ANY* combination of speed, full/half duplex to work.

If I turn ON Auto-Negotiation, I can select the speeds to advertise.
 10Mbps half duplex
 10Mbps full duplex
 100Mbs half duplex
 100Mbs full duplex
 1Gbps half duplex
 1Gbps full duplex

If I ONLY advertise 10M half and 10M full, the board won't respond and the negotiation fails.

If I ONLY advertise 100M half and 100M full, the board responds, the negotiation indicates 100M full duplex negotiated.

If I ONLY advertise 100M half, the board still responds and the negotiation indicates 100M half duplex negotiated.

So it appears it works fine on either 100 full or duplex, but only with autonegotiation enabled!

Interestingly, if I advertise 10M full and half, I get the link partner advertising 10M half, 10M full, 100M half and 100M full - but
then advertising NOTHING and the autonegotiation failing.

If I advertise 100M half or full, the link partner (WC32) advertising says 10M half, 10M full, 100M half and 100M full.
 
 
rossw said:
If I turn auto negotiation off, I cannot get *ANY* combination of speed, full/half duplex to work.
Great bit of troubleshooting, nice having such a versatile Enet switch.
 
So it sounds like WC32 does know how to handle "old style" 10 Mbps keep alive. It should default to 10 Mbps HDX and if you manually configured the switch correctly should have a good link. And - just for good measure - even though WC32 advertises support for 10 Mbps FDX all flavors of 10 appear to be broken.
 
However: that raises an interesting question. I assume the problem you ran into was while using Fast Ethernet switches. Given this newly discovered limitation of the WC32 you should never have even seen the problem.
 
/tom
 
Because all the network NIC controllers, including best ones like Intel, do not implement complete set of all the handshaking protocol, the best way to handle that is to make sure the switch enabled auto-negotiation. WC32 auto-negotiation is done completely in the hardware RealTek chip.
 
I think newer 10/100/1000 switches heavily depends on auto-negotiation, thus they work better in most cases. 
 
Still worth it to look into the PIC32 code to see what flags it is setting and how it manages the RT interface.
 
Hi AZ1324,
 
I personally looked the code. In all the configuration routines provided by RealTek, it simply returns with a comment: handled by hardware.
So there is nothing we can actually configure on the NIC controller chip.  I also contacted our people with connection to RealTek to see if they have anything
to provide us for tweaking the NIC chip. so far, we got no answer back yet.
 
From past dealing with Intel NIC chip sets, I learnt that a lot of auto-negotiation are done in the hardware level, Even we have good relationship with Intel, they rarely provide anything for us to change its chip behavior, other than release their new driver code for their new chipset.  This Realtek chip is 10/100 and not having any new driver for a long time.
 
From Intel NIC chip engineers told us, there is no company implemented all possible handshake into its NIC chip.  The best way to do is to enable auto-negotiate on the switch, so that both sides can determine best way to communicate.  Even the best brand network switch and NIC, from time to time you will need to go into switch configuration to tweak the port configuration -- because not all auto-negotiation will produce the best result does not matter brand.  Otherwise, there will no need to have management feature on switch for tweaking the port settings.
 
Well there is a lot going on in ETHPIC32ExtPhy.c as well as register values to check in eth_pic32_ext_phy_rtl8201FL.h
 
We actually has a separate file provided by Realtek. we send all the configuration into that file, we named that ETHPIC32ExtPhyRTL8201E.c
In that all the configuration routine just return, and comment saying : // handled by hardware.
 
I think I tried my best to explain. If you think there are some configuration can change the chip auto-negotiation, please do let us know.
 
Sounds a lot like "use the default settings and hope for the best". I suggest you look at the routines in ETHPIC32ExtPhy.c and the datasheet for all the register values. Also compare to eth_pic32_ext_phy_rtl8201FL.h and eth_pic32_ext_phy_rtl8201FL.c since they should be very similar.
 
RTL8201E chip through EthMIIMWWriteReg() then read back through EthMIIReadReg() returned value not changed, indicate those registers are read only for most configurations. 
So that after reset the chip, we just tell it to do auto-negotiation. 
We do appreciate your pointers.
 
Doesn't seem too thorough. So are you investigating the 10baset problems or just saying only use it at 100baset?
 
like we have discussed in private messages, we have asked RealTek to provide us more information. So far, we have not heard anything back yet.
If we can get anything that would helpful, we will investigate more.  We can not work based on guessing.
 
We have update all our switches to 10/100/1000 switches back couple years ago, so we don't really see problem.  We wish we can see the problem ourselves.  If you have any detailed suggestion, please do send to us with which register to which value, so that we can generate some testing firmware for you to test out.  We really appreciate your help!
 
Our engineers took a look at this matter, after some testing, they told me this NIC on WC32 requires the switch support auto-negotiation.  All new switches sold on market now support auto-negotiation.  However, some older switches did not.  The NIC chip is not very flexible, if we force it check speed manually, it will have bad result for many users. 
 
For now, we decide just make this a known requirement that WC32 will require the switches support auto negotiation.
 
That doesn't explain this result:

If I ONLY advertise 10M half and 10M full, the board won't respond and the negotiation fails.
 
Back
Top