• AVR Freaks

Hot!PIC32MZ Ethernet/PHY EREFCLK question

Author
boatbodger
Junior Member
  • Total Posts : 85
  • Reward points : 0
  • Joined: 2011/03/27 15:39:07
  • Location: 0
  • Status: offline
2019/12/23 11:23:19 (permalink)
0

PIC32MZ Ethernet/PHY EREFCLK question

I am working on a cost sensitive controller which needs an Ethernet interface, and USB, using PIC32MZ1024EFE064 with a LAN8742 PHY chip.
I would like to use only one crystal oscillator to clock the PIC32MZ, at 24MHz, then generate the 50MHz required by both the PHY chip and the PIC32MZ MAC interface using one of the REFCLK outputs.
 
To me it would seem logical to use a single pin on the PIC for this, to both output the PIC-generated REFCLK for connection to the PHY chip, and have the PIC's built-in MAC "hear" the same 50MHz clock back.
 
Pin 63 of my PIC is the standard EREFCLK input for the MAC
It is also one of the possible output pins for REFCLK3O.
If I configure that pin for both uses, I see the 50MHz coming out of the PIC on a 'scope and the PHY works correctly in that the LAN activity light starts to flicker (it doesn't if the 50MHz is not present).
 
However, the MAC behaves as if it is un-clocked.
 
By contrast if I divert REFCLK3O to pin 52, and link pins 52 and 63 externally everything works.
 
It looks as if by configuring pin 63 as REFCLK is somehow decoupling the input buffer, which I find odd.
 
I can kinda live with this external loop, although I'd prefer to keep the pin free for other uses, (and it offends my sense of elegance having this connection!)
 
Has anyone else had success using just one pin for both REFCLKnO and EREFCLK 
post edited by boatbodger - 2019/12/25 02:31:23
#1

2 Replies Related Threads

    ric
    Super Member
    • Total Posts : 26091
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: PIC32MZ Ethernet/PHY EREFCLK question 2019/12/24 14:32:02 (permalink)
    0
    boatbodger
    ... using PIC32MZ1024EFE10064

    No such part number.
    Do you mean PIC32MZ1024EFE064 ?

     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    boatbodger
    Junior Member
    • Total Posts : 85
    • Reward points : 0
    • Joined: 2011/03/27 15:39:07
    • Location: 0
    • Status: offline
    Re: PIC32MZ Ethernet/PHY EREFCLK question 2019/12/24 16:07:19 (permalink)
    0
    Hi Ric,
    Thanks for picking that up, yes, the EFE64.  OP corrected.
    #3
    Jump to:
    © 2020 APG vNext Commercial Version 4.5