• AVR Freaks

Hot!KSZ8775 PHY mode-two PIC32MX-RMII-how to share MIIM(mdio/mdc) lines for port 5 and port 4

Author
Ajith Tomy
New Member
  • Total Posts : 14
  • Reward points : 0
  • Joined: 2016/12/30 02:41:27
  • Location: India
  • Status: offline
2019/10/15 03:07:11 (permalink)
0

KSZ8775 PHY mode-two PIC32MX-RMII-how to share MIIM(mdio/mdc) lines for port 5 and port 4

Three ICs are in my PCB.
U2 and U3 are PIC32MX695f512L.
U1 is KSZ8775 (Ethernet HUB 3PHY/5MAC).
PCB connections like this.
U2(PIC32) connected to U1(KSZ8775) via RMII interface on port 4. MIIM(MDC/MDIO) lines are handled by U2.
U3 connected to KSZ8775 5th Port via RMII. MIIM lines of U3 kept N.C.
An ICMP server on both U2 and U3. I'm using KSZ8863 driver for KSZ8775.
I got the ping from U2. U3 is not working.
TCP/IP stack, not initialize in U3. I found that MIIM lines are necessary to Initialize the Microchip TCP/IP stack come with Harmony V2.06.
How do I work U1 and U2 together?
Maybe this is a common question rise from KSZ8864(2PHY and 4 mac), KSZ8863 support available on harmony V2.06.
 
regards
Ajith

Attached Image(s)

#1

5 Replies Related Threads

    Ajith Tomy
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2016/12/30 02:41:27
    • Location: India
    • Status: offline
    Re: KSZ8775 PHY mode-two PIC32MX-RMII-how to share MIIM(mdio/mdc) lines for port 5 and por 2019/10/15 03:48:23 (permalink)
    0
    I'm sorry there is a mistake in the above post
     
    How do I work U2 and U3 together?
     
    How to get the ping from U2 and U3 at the same time?
    or How to disable MIIM(MDIO/MDC) without affecting other functions Microchip TCP/IP stack?
     
    #2
    mbrowning
    USNA79
    • Total Posts : 1553
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: offline
    Re: KSZ8775 PHY mode-two PIC32MX-RMII-how to share MIIM(mdio/mdc) lines for port 5 and por 2019/10/15 07:35:09 (permalink)
    0
    edit - It's been a couple years since I did this design, and I used RGMII mode on port 5, so I'm not sure my comments on port 5 setup are accurate in RMII mode.
     
    I'm not sure I fully understand your question, but I have used this device but in a different configuration.
    I had 4 processors connected to ports 1-4 with RMII (ports 1-3 had RMII PHYs externally to connect to 8775's internal PHYs. Port 5 defaults to MAC mode and expects an external PHY. You need to change port 5 to PHY mode since you have an external MAC. My setup needed no extra configuration
     
    This can be done through resistor configuration, otherwise must be done through the SPI interface. The MDIO interface only connects to the internal PHYs. The SPI interface can access all internal registers.
     
    I would think through resistor configuration you could make this work without any SPI or MDIO transactions, but of course I always connect up just in case. Since there's only one SPI interface, your PIC32s will either need to have only one connected, or arbitrate the interface so only one at a time is the master. I would think only the port 5 PIC32 really needs access, so you could just connect that one.
    post edited by mbrowning - 2019/10/15 07:41:25

    Go Navy! Beat Army!
    #3
    rainad
    Super Member
    • Total Posts : 1225
    • Reward points : 0
    • Joined: 2009/05/01 13:39:25
    • Location: 0
    • Status: offline
    Re: KSZ8775 PHY mode-two PIC32MX-RMII-how to share MIIM(mdio/mdc) lines for port 5 and por 2019/10/15 12:55:03 (permalink)
    0
    The MIIM code is used by the TCP/IP stack is used by the PHY driver to communicate with the PHY chip, using the MDC/MDIO lines.
    I can suggest 2 approaches:
    - If you're sure that the PHY port that you're using is properly configured (with power on resistors, for example) then you can use you own PHY object (the PHY driver is a virtual object) to replace the default one.
    This one doesn't need to use the MIIM driver at all.
    - Or, since the MIIM driver is also virtual, you can replace the default MIIM object (talking to a PHY over the MDC/MDIO bus) with another one that uses SPI.
    This would allow you enough flexibility.
     
    #4
    Ajith Tomy
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2016/12/30 02:41:27
    • Location: India
    • Status: offline
    Re: KSZ8775 PHY mode-two PIC32MX-RMII-how to share MIIM(mdio/mdc) lines for port 5 and por 2019/10/15 22:27:43 (permalink)
    0
    Hi, mbrowning, 
    Hi, rainad,
    Thanks for your comments. I'm so happy to hear both of you.
     
    I know KSZ8775 is a factory out a driver-free device, no need to modify any register, everything can be done by pull-up pull-down resistor configuration.
    bref working:- Microchip TCP/IP stack ICMP server (ICMP server - PIC32INTMAC - Ethernet MAC driver - MIIM driver) are put inside both PIC32s. PIC32s are interfaced with HUB in PHY MODE.
    If I'm making few numbers of bord, okay agree with mbrowning.
    Above schematic is a potion 4 port logger device. somebody ask me for an 8,16 or 32 port solution, can be done by PCB stack up.
    My question is not about KSZ8775 HUB, he is fine.
    I'm bothering about Microchip TCP/IP stack ethernet MAC driver and MIIM driver.
    To go ahead these guys need replay from a PHY(Like I'm okay or I'm here).Smile: Smile
    All HUBs are available in the market, maybe only one management line(MIIM, SPI, I2C). 
    So as rainad said 2 approaches. Let check.
     
    Can anyone share some code hint?
     
    Regards 
    Ajith 
    #5
    Ajith Tomy
    New Member
    • Total Posts : 14
    • Reward points : 0
    • Joined: 2016/12/30 02:41:27
    • Location: India
    • Status: offline
    Re: KSZ8775 PHY mode-two PIC32MX-RMII-how to share MIIM(mdio/mdc) lines for port 5 and por 2019/10/17 02:22:26 (permalink)
    #6
    Jump to:
    © 2019 APG vNext Commercial Version 4.5