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.