• AVR Freaks

Hot!How do you see if a PIC32 is talking to the PHY?

Author
mrpackethead
packet mangler
  • Total Posts : 967
  • Reward points : 0
  • Joined: 2007/04/01 23:33:39
  • Location: 0
  • Status: offline
2016/09/04 14:53:05 (permalink)
0

How do you see if a PIC32 is talking to the PHY?

I have a PIC32MZ that is connceted on teh ALT Etherent Pins of a LAN8740.. 

I've got a very basic applicaiton that should just bring the ip up and allow a ping.  As yet i dont' get any IP going at all and i need to see if i have communication that works between the PIC32 and the PHY..
 
How i can see if that is working?
 
#1

6 Replies Related Threads

    David
    Pic User
    • Total Posts : 1307
    • Reward points : 0
    • Joined: 2007/12/17 23:19:53
    • Location: uk sussex
    • Status: offline
    Re: How do you see if a PIC32 is talking to the PHY? 2016/09/06 09:49:00 (permalink)
    3 (1)
    scope ?

    David
    I support http://picforum.ric323.com because this forum is often too broken to use!
    #2
    ScratchMonkey
    Starting Member
    • Total Posts : 33
    • Reward points : 0
    • Joined: 2016/02/13 11:51:56
    • Location: 0
    • Status: offline
    Re: How do you see if a PIC32 is talking to the PHY? 2016/09/06 17:53:20 (permalink)
    0
    The PHY initialization code is in framework/driver/ethphy/src/dynamic/drv_ethphy.c. Add a breakpoint to the error path in the status report routine in that file.  If there's any failure, you'll hit that breakpoint. Here's the routine for 1.08.01:
     
    static void _DRV_PHY_SetOperDoneResult(DRV_ETHPHY_CLIENT_OBJ * hClientObj, DRV_ETHPHY_RESULT res)
    {
        hClientObj->operPhase = hClientObj->operSubPhase = 0;
        hClientObj->operType = DRV_ETHPHY_CLIENT_OP_TYPE_NONE;
        hClientObj->status = DRV_ETHPHY_CLIENT_STATUS_READY;
        hClientObj->operRes = res;
        if(res < 0)
        {
            SYS_CONSOLE_PRINT("PHY operation error: %d\r\n", res);
            __builtin_software_breakpoint(); // add this line!!!
        }
    }

    #3
    NKurzman
    A Guy on the Net
    • Total Posts : 18975
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: How do you see if a PIC32 is talking to the PHY? 2016/09/06 18:03:28 (permalink)
    0
    harmony offers:
    SYS_DEBUG_BreakPoint();
    #4
    Howard Long
    Super Member
    • Total Posts : 836
    • Reward points : 0
    • Joined: 2005/04/04 08:50:32
    • Status: offline
    Re: How do you see if a PIC32 is talking to the PHY? 2016/09/08 00:16:13 (permalink)
    3 (1)
    I agree regards using a scope, the phy MII based protocols are reasonably easy to decode manually if you need to.
    #5
    eddy103
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2020/09/13 11:49:43
    • Location: 0
    • Status: offline
    Re: How do you see if a PIC32 is talking to the PHY? 2020/09/23 06:17:05 (permalink)
    0
      i am new to harmony3 and i have tried creating a tcp/ip project using pic32mz but it seems i am expereiencing a driver (ETH-PHY_KSZ8081MLX) problem. below is my output. can someone help!
     
    nbproject/Makefile-default.mk:471: recipe for target 'build/default/production/_ext/444070925/drv_ethphy.o' failed
    ../src/config/default/driver/ethphy/src/dynamic/drv_ethphy.c: In function '_DRV_PHY_SetOperDoneResult':
    ../src/config/default/driver/ethphy/src/dynamic/drv_ethphy.c:374:9: error: implicit declaration of function 'SYS_CONSOLE_PRINT' [-Werror=implicit-function-declaration]
             SYS_CONSOLE_PRINT("DRV_PHY operation error: %d\r\n", res);
             ^
    cc1.exe: all warnings being treated as errors
    make[2]: *** [build/default/production/_ext/444070925/drv_ethphy.o] Error 255
    make[2]: *** Waiting for unfinished jobs...
     
     
    #6
    BillP
    Super Member
    • Total Posts : 425
    • Reward points : 0
    • Joined: 2014/09/28 07:53:35
    • Location: CA
    • Status: offline
    Re: How do you see if a PIC32 is talking to the PHY? 2020/09/23 16:55:16 (permalink)
    0
    you need to configure the SYS_CONSOLE module in Hv3 or comment out all the lines with SYS_CONSOLE_PRINT or similar system console calls.  These error messages are a real bother if you do not have/want a UART port.

    New book: Learn Harmony v3.  Go to amazon.com/books, then search for Bill Petrick
    #7
    Jump to:
    © 2020 APG vNext Commercial Version 4.5