This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP-EXP432E401Y: can't enable the PHY module (no link)

Part Number: MSP-EXP432E401Y


Hello.

I use MSP-EXP432E401Y Evaluation Board, I write my assembly code in the Code Composer Studio.

I try to enable the PHY module. I want to start it with Default Configuration (SLAU723A, paragraph “15.5.1.1 Default Configuration”, page 937).

I check the P0 bit in the PCEPHY register and this bit becomes “1”. I can also read and write the PHY registers using EMACMIIADDR Register. I check their values and see, that all the PHY registers have default values. But the on-board LEDs do not shine and bit 0 (LINK) is not set in the EPHYSTS Register.

My Ethernet cable is connected to the board. I checked the board with an example code (“ethernet-based_io_control_MSP_EXP432E401Y_nortos_ccs”) and it acts rightly.

The EMAC module is enabled as well. I paste a part of my code, I hope it will help you.

;Default Configuration

;To enable the Ethernet PHY with its default configuration, the steps are as follows:

 

;1. To hold the Ethernet PHY from transmitting energy on the line during configuration, set the PHYHOLD

;bit to 1 in the EMACPC register.

 

        LDR             R1,             [R0,    #EMACPC]

        ORR             R1,             #0001b

        STR             R1,             [R0,    #EMACPC]

 

;2. Enable the clock to the PHY module by writing 0x0000.0001 to the Ethernet PHY Run Mode Clock

;Gating Control (RCGCEPHY) register at offset 0x630. When the R0 bit reads as 1 in the PREPHY

;register at System Control offset 0xA30, continue initialization. !!!!!!!!!!!!!!!

 

        LDR             R0,     System_Control_Registers_base

        MOV             R1,             #0x1

        STR             R1,             [R0,    #RCGCEPHY]

waitPHYclock:

        LDR             R1,             [R0,    #PREPHY]

        CBNZ            R1,             Enable_power_PHY

        B               waitPHYclock

 

Enable_power_PHY:

;3. Enable power to the Ethernet PHY by setting the P0 bit in the PCEPHY register at System Control

;offset 0x930. When the R0 bit reads as 1 in the PREPHY register at System Control offset 0xA30, the

;PHY registers are ready for programming.

 

        MOV             R1,             #0x1

        STR             R1,             [R0,    #PCEPHY]

waitPHYpower:

        LDR             R1,             [R0,    #PREPHY]

        CBNZ            R1,             PHY_power_is_enabled

        B               waitPHYpower                          

 

PHY_power_is_enabled:

;--------------------------------------------

; Allow to transmit energy on the line.

        LDR             R0,             EMAC_Registers_base

        LDR             R1,             [R0,    #EMACPC]

        BIC             R1,             #1

        STR             R1,             [R0,    #EMACPC]

 

loop:

        B       loop

 

 

Can I see without full configuration (EMAC and DMA) that the PHY is working?

I configure the Ethernet module of the MSP432 for the first time, so I can mistake in easy things. Thank you, I hope someone will be able to help me.

Best Regards.

  • Have you turned on the main oscillator (MOSC))? The PHY uses that directly.

    I once forgot to turn it on (MAP_SysCtlClockFreqSet()) and the PHY wouldn't start up.

    I encourage you to look over the example code (e.g. C:\ti\simplelink_msp432e4_sdk_3_20_00_10\examples\nortos\MSP_EXP432E401Y\lwip\ethernet_with_lwip) to see what pieces you need.

  • Hello.

    Thank you for the reply, Bruce. I will check the example, but I use assembly code.

    Regarding the MOSC. Yes, I have turned the MOSC on. And I’m sure, it is turned on, as I switch the SysClock to MOSC and check the SysClock frequency with pin PQ4, configured as frequency monitor. The frequency changes to 12,5MHz (the monitored frequency is divided in factor of 2). So the MOSC acts rightly.

    Best regards.

  • Hello.

    Thank you very much, Bruce. I have managed to enable the PHY. It works, my computer Ethernet adapter shows a net, the LEDs on the board shine, when I connect the cable.

    I took the sequence of actions from the example code, which you advised. I solved my problem.

    Best regards.