LPC54016 MDIO Clause 45

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC54016 MDIO Clause 45

726 Views
DanIton92
Contributor I

Hello , I am using LPC54016JBD100 , and I want to communicate with a Marvell 10G PHY, for that according to the Marvell datasheet (88X3310_88X3340_88X3310P_88X3340P_Datasheet_Proprietary_Doc_Rev_H-v8a) it uses Clause 45 to write to the Marvell registers.

Is the LPC54016 SDK 2.15 ENET driver supports clause 45? , because in the read/write function note it says it supports but the fields and opcodes does not seems fit to clause 45.

If it does not support , what can I update to support clause 45 in my project?


**Notes**

/*!

* brief Starts a SMI write command.

* support both MDIO IEEE802.3 Clause 22 and clause 45.

*

* param base ENET peripheral base address.

* param phyAddr The PHY address.

* param regAddr The PHY register.

* param data The data written to PHY.

*/

void ENET_StartSMIWrite(ENET_Type *base, uint8_t phyAddr, uint8_t regAddr, uint16_t data)

 

/*! @brief Define the MII opcode for normal MDIO_CLAUSES_22 Frame. */

typedef enum _enet_mii_normal_opcode

{

kENET_MiiWriteFrame = 1U, /*!< Write frame operation for a valid MII management frame. */

kENET_MiiReadFrame = 3U /*!< Read frame operation for a valid MII management frame. */

} enet_mii_normal_opcode_t;


Thank for any help.

Dan Iton

Labels (1)
0 Kudos
13 Replies

7 Views
andreytarakin
Contributor I

Hello,

I would like to revive this toipc.

in the user manual for LPC540xx (Rev 1.5) it says Cluase 45 is supported:

andreytarakin_0-1719389170024.png

 

in the MDIO section of the ENET module however, there is no mention on how to make the MCU to operate in Clause 22 or 45. There are simply 2 registers, MDIO Address and MDIO Data.

 the interesting thing is that MDIO Address register has field called MOC, which controls the type of operation. In Clause 45 case, it should have value 0x00 for address. in this user manual, 0x00 appears as reserved, making me think that the MCU either does not really support Clause 45 or the user manual needs an updated:

andreytarakin_2-1719389720327.png

 

In addition, when i capture the MDC and MDIO signals using a scope, the ST bits of the frame are 01 (clause 22) whereas i need them to be 00 (clause 45). in the user manual there seems to be no way the change these bits.

 

Your response is much appreciated.

Best Regards,

Andrey Tarakin

 

0 Kudos

205 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, I apologize for the long time is being taken, we still working on your case, and the designers are helping us with this support.

Best regards,
Pavel

0 Kudos

359 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, I have not much experience with Ethernet and MDIO. I am handling it with my team, I´m asking to get more details about your application. 

Certain Marvell PHYs are known for only supporting C45 frames instead of C22 frames, could you please let us know if you are facing this? We are reviewing the information with the design team too.

Best regards,
Pavel

0 Kudos

334 Views
DanIton92
Contributor I
No problem, Pavel.
I am Using 10G PHY of Marvell and Microchip both using C45 according to manuals and datasheet.
0 Kudos

403 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, I have some other questions about your case I will discuss this with my team would you give us more details?

Can you clarify the content of Clause 45? or which standard includes this clause? IEEE 802.3? or other, I will download the standard to see it.

Best regards,
Pavel

 

 
 
0 Kudos

389 Views
DanIton92
Contributor I

Hi Pavel, didn't understand why you need me to answer this question, but I think it is 802.3, please double check me.

I really need some code to support this protocol ASAP.'

Furthermore , I saw some code examples for clause 45 on other NXP MCU SDKs (i.e. IMXRT1170RM) on the fsl_enet , but in my MCU(LPC54016), I do not have this example although it says on the UM it supports it.

Thanks, and Best Regards.

Dan Iton

0 Kudos

534 Views
DanIton92
Contributor I

Hi Pavel , Thanks for your answer .
In my previous reply I asked a couple of questions please refer to them to help me understand.
Best regards .
Dan Iton

0 Kudos

666 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, my name is Pavel, and I will be supporting your case, I reviewed the RM and the MCU supports clause 45 and I found this document that maybe could help you.

Best regards,
Pavel

0 Kudos

643 Views
DanIton92
Contributor I

Hi Pavel , Thanks for your answer.

I want to refer to the document you sent me I have couple of questions:

 "Please note that the LPC54628  SDK can be used to evaluate the LPC54606"

  • None of the mention in the quote of your document is match my MCU , I have LPC54016 , So which changes to do in that case? 

"

static inline status_t MDIO_Write(mdio_handle_t *handle, uint32_t phyAddr, uint32_t devAddr, uint32_t data)
{
return handle->ops->mdioWrite(handle, phyAddr, devAddr, data);
}"

  • If the change are the same , do I need to change the mdioRead also?
  • I cant see any difference between the , mdioRead/write and mdioReadExt/write, hope you can explain the difference.
  • Please explain how does it supports clause 45 according to clause 45 steps , I do not see any mention off the opcode and no mention of the writing to register 13,14 in order to choose the device first and then the register(see the steps below for read operation)?
    • Read Operation
      To read from the MMD register access:
      1. To register 13, write the Function field to 00 (address) and DEVAD field with the device address
      value.
      2. To register 14, write the MMD’s register address value.
      3. To register 13, write the Function field to 01 (Data, no post increment) and DEVAD field to the
      same device address value (as step #1).
      4. From register 14, read the content from the selected MMD’s register.
      Step 1 and 2 can be skipped if the MMD’s address register was previously configured.

Thanks for your help , Best Regards.

Dan Iton

0 Kudos

581 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, I reviewed the example of the LPC54018 has the same driver, and I think you can make that modification.

Pavel_Hernandez_0-1713972544442.pngPavel_Hernandez_1-1713972560485.png

 

Best regards,
Pavel

0 Kudos

454 Views
DanIton92
Contributor I
Still did not get answer to my last reply.
0 Kudos

443 Views
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, sorry for the late response, I waiting to get more information from the other partner on my team, I apologize for this inconvenience.

Best regards,
Pavel

0 Kudos

160 Views
tomerk
Contributor I

Hi,

Did you get more information?

Thanks.

Tomer

0 Kudos