• AVR Freaks

RMII or MII on the PIC32MX with Harmony?

Author
muellernick
Super Member
  • Total Posts : 472
  • Reward points : 0
  • Joined: 2015/01/06 23:58:23
  • Location: Germany
  • Status: online
2015/02/06 01:42:07 (permalink)
0

RMII or MII on the PIC32MX with Harmony?

Hi!
 
I have to make a tough decision re designing a board:
The core question is: Should I use RMII or MII for Ethernet? Pin count is not the problem here. But does Harmony really support MII?
This question has to be seen in context with the PHYs Harmony supports. The LAN87xx chips would be preferable. For MII, the LAN8740 would be my preferred choice.
So this all ends in a single and clear question:
Does Harmony support the LAN8740 in MII with a PIC32MX795F512L. And not just in theory, but boards that do exist and run.
 
The PIC32MZ has a daughter board with the LAN8740, but what puzzles me is its 50MHz clock. That would be RMII. MII would be 25MHz. Right?
 
To put the icing on the cake, is there a schematic with an LAN8740 in MII of an actual working design?
 
I'd be really glad for any input! I can't risk that the board doesn't work, as my time-schedule is really tight.
 
Nick
#1

12 Replies Related Threads

    enginsubasi
    Starting Member
    • Total Posts : 43
    • Reward points : 0
    • Joined: 2014/12/16 06:51:03
    • Location: 0
    • Status: offline
    Re: RMII or MII on the PIC32MX with Harmony? 2015/02/06 01:54:15 (permalink)
    0
    I don't anything about MII but RMII is works well. I'm using lan9303
    #2
    roundrocktom
    Super Member
    • Total Posts : 1023
    • Reward points : 0
    • Joined: 2012/09/07 08:19:09
    • Location: Texas
    • Status: offline
    Re: RMII or MII on the PIC32MX with Harmony? 2015/02/06 08:18:36 (permalink)
    3.5 (2)
    MII or RMII works fine.
     
    No issues with PIC32MX
     
    THe LAN8740 daughter card on the PIC32MZ Starter Kit is running in RMII mode.   Schematic shows a 50Mhz clock is supplied to the daughter card, hence RMII.  To keep down the number of interconnecting pins, they kept it in RMII mode.
     
    On the PIC32MZ  the 84 pin part is RMII only.    On the larger pin devices, either RMII or MII is fine.  Only issue is when running RMII, the "spare pins"  are not available.  Check the errata for details.
     
     
     
     
    #3
    roundrocktom
    Super Member
    • Total Posts : 1023
    • Reward points : 0
    • Joined: 2012/09/07 08:19:09
    • Location: Texas
    • Status: offline
    Re: RMII or MII on the PIC32MX with Harmony? 2015/02/06 09:37:30 (permalink)
    0
    The PIC32MZ has a daughter board with the LAN8740, but what puzzles me is its 50MHz clock. That would be RMII. MII would be 25MHz. Right?

     
    Correct.  Only reason the PIC32MZ used RMII was for fewer interconnecting pins on the daughter board.
     
    post edited by roundrocktom - 2015/02/06 09:38:49
    #4
    muellernick
    Super Member
    • Total Posts : 472
    • Reward points : 0
    • Joined: 2015/01/06 23:58:23
    • Location: Germany
    • Status: online
    Re: RMII or MII on the PIC32MX with Harmony? 2015/02/09 00:31:25 (permalink)
    0
    Thank you guys!
     
    Yes, it is a 100 pin device. And I have read about the issue that RMII doesn't make available the extra pins needed for MII. So that's just an other argument to go MII.
     
    I'll take the LAN8740.
     
    Back to the drawing board ...
     
    Nick
    #5
    muellernick
    Super Member
    • Total Posts : 472
    • Reward points : 0
    • Joined: 2015/01/06 23:58:23
    • Location: Germany
    • Status: online
    Re: RMII or MII on the PIC32MX with Harmony? 2015/05/22 07:14:54 (permalink)
    4 (1)
    Hi!
     
    Just as a feedback:
    I designed a board with an LAN8740A running in MII-mode. All worked fine. At least on the Harmony-side. :-)
     
    I routed two connections wrong, but was able to fix that on the prototype board with bodge wires.
     
    Nick
    #6
    RISC
    Super Member
    • Total Posts : 5376
    • Reward points : 0
    • Status: offline
    Re: RMII or MII on the PIC32MX with Harmony? 2015/05/23 06:39:25 (permalink)
    3 (1)
    Hi,
     
    There is a significant benefit from the PCB point of view to use MII rather than RMII : less critical layout.
    RMII interface uses 50MHz data bus against 25 MHz for MII, in order to compensate for the reduced number of data lines .
     
    Regarding RMII/MII errata in PIC32MZ, it is still possible to use the spare MII lines in RMII mode depending upon their priority. this is clearly explained in the erratasheet.
    So, If you are short of pins you can still consider using RMII but check the limitations on spare released MII I/Os
     
    Regards
    #7
    swissembedded
    Starting Member
    • Total Posts : 81
    • Reward points : 0
    • Joined: 2013/05/24 00:11:03
    • Location: 0
    • Status: offline
    Re: RMII or MII on the PIC32MX with Harmony? 2016/02/17 06:54:24 (permalink)
    0
    Does the PIC32MZ2048EFM064 (EF Family) also prevent the usage of the RMII unused pins (MII spare lines)? Harmony does not support the usage of those pins with the chip.
    see #7

    #8
    roundrocktom
    Super Member
    • Total Posts : 1023
    • Reward points : 0
    • Joined: 2012/09/07 08:19:09
    • Location: Texas
    • Status: offline
    Re: RMII or MII on the PIC32MX with Harmony? 2016/02/17 08:40:59 (permalink)
    0
    swissembedded
    Does the PIC32MZ2048EFM064 (EF Family) also prevent the usage of the RMII unused pins (MII spare lines)? Harmony does not support the usage of those pins with the chip.
    see #7



    No.   Take at look at the PIC32MZ Embedded Connectivity with Floating Point Unit (EF) Family Silicon Errata and Data Sheet Clarification
     
    No idea what "see #7" is in reference to, but suspect that applied to the older PIC32MZ - EC Silicon.
     
    What seems really odd is the "other function" on those pins seems really odd. This on PIC32MZ EF - 60001320B datasheet I just picked ERXD3 at random to compare between packages.
     
    64 PIN QFN/TQFP - pin 56 ERXD3/AETXD1/RPF0/RF0
    100 PIN TQFP - pin 44 EBIA0/AN10/ERXD3/AETXD2/RPB15/OCFB/PMA0/RB1
    124 PIN VLTA - pin A40 ERXD3/RH9
    144 PIN TQFP/LQFP -- pin 82 ERXD3/RH9
     
    It looks very odd, to see alternate pin functions change between packages.
    #9
    enginsubasi
    Starting Member
    • Total Posts : 43
    • Reward points : 0
    • Joined: 2014/12/16 06:51:03
    • Location: 0
    • Status: offline
    Re: RMII or MII on the PIC32MX with Harmony? 2016/02/17 08:54:40 (permalink)
    0
    I used PIC32 ESK with RMII interface and its working well and also I used LAN9303 with RMII I dont see any problem. I dont have any info about MII
    #10
    malaugh
    Super Member
    • Total Posts : 399
    • Reward points : 0
    • Joined: 2011/03/31 14:04:42
    • Location: San Diego
    • Status: online
    Re: RMII or MII on the PIC32MX with Harmony? 2016/02/17 17:05:12 (permalink)
    4 (1)
    Anther option for you would be the ENC28J60. We use this on our boards because it just requires a SPI port, no need for ethernet support on the CPU, and fewer external parts needed than the PHY chips.  We are using this in a PIC32MX with the PLIB/MLA, TCP/IP stack.  I assume support for this chip was ported over to Harmony.  There is a faster version if you need the speed, cannot remember the part number.   Works very well.
    #11
    DarioG
    Allmächtig.
    • Total Posts : 54081
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: Oesterreich
    • Status: offline
    Re: RMII or MII on the PIC32MX with Harmony? 2016/02/17 17:09:28 (permalink)

    GENOVA :D :D ! GODO
    #12
    swissembedded
    Starting Member
    • Total Posts : 81
    • Reward points : 0
    • Joined: 2013/05/24 00:11:03
    • Location: 0
    • Status: offline
    Re: RMII or MII on the PIC32MX with Harmony? 2016/02/17 23:58:47 (permalink)
    4 (1)
    Found the problem, FMIIEN option must be off for RMII. Now everything looks good. We already ported FreeRTOS TCP/IP stack and wrote driver for MAC, so no way to use ENC424J600 ;-).
     
    #13
    Jump to:
    © 2019 APG vNext Commercial Version 4.5