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.

TMS570LC4357: Can you help me to solve 4 questions mainly about the EMAC modules?

Part Number: TMS570LC4357

During last few days,I have met 3 questions below:

1.can you help me to check the schematics?8267.SB_V1005.pdf

2.when I want to use the Ethernet module, I found that if I write valueto registers,I will read different value.For example:

MDIO_USERACCESS0 = 
( 1 << 31 ) /*[31] Go*/
| ( 0 << 30 ) /*[30] Read*/
| ( 0 << 29 ) /*[29] Ack*/
| ( (RegAddr & 0x1F) << 21 ) /*[25-21] PHY register address*/
| ( (PhyAddr & 0x1F) << 16 ) /*[20-16] PHY address*/
| ( 0 << 0 ); /*[15-0] Data*/

(

#define MDIO_BASE               (0xFCF78900UL)

#define MDIO_USERACCESS0        *( volatile uint32_t* )( MDIO_BASE + 0x80UL )

)

After writing to MDIO_USERACCESS0 ,I will read 0x0021FFFF or something like that,but obviously I didn't write  0x0021FFFF.

3.I can't read theregisters.

#define ECTRL_BASE              (0xFCF78800UL)

#define ECTRL_SOFTRESET *( uint32_t* )( ECTRL_BASE + 0x04UL )

I can't find the register ECTRL_SOFTRESET or read the value of it.

4.I can't connet to DP83640

IsNormal = (MDIO_LINK & 2U) ? TRUE : FALSE;

(

#define MDIO_LINK *( volatile uint32_t* )( MDIO_BASE + 0x0CUL )

#define MDIO_BASE               (0xFCF78900UL)

)

MDIO_LINK is always 0;

  • Hello,

    1. If you need TI to review your schematics, please contact with local FAEs.
    2. Your software must check the status of the GO bit in USERACCESS0 before initiating a new transaction, to ensure that the previous transaction has completed.

    //check GO bit
    while( MDIO_USERACCESS0 & 0x80000000 );

    //read the data
    value = MDIO_USERACCESS0;

    3. Can you access SOFTRESET register using CCS register window? or are you able to write/read SOFTRESET in your code instead of using CCS expression?

    #define ECTRL_SOFTRESET *( volatile uint32_t* )( ECTRL_BASE + 0x04 )
    value = ECTRL_SOFTRESET;

    4. MDIO Link is set if the PHY with the corresponding address has link and the PHY acknowledges the read transaction. The bit is reset if the PHY indicates it does not have link or fails to acknowledge the read transaction. Writes to the register have no effect.

    Can you read the ID or revision number from the PHY?
  • How to read the ID or revision number from the PHY? I mean can you give me an example?

    I use the pins like this:

    Is the pinmux file right?

    0358.HL_pinmux.c

  • The register 2 and register 3 are for PHY ID.

    Which board did you use in your test?

  • I think I got the reason.I used the pins uncorrectly.For example,

    I used the pin G4 as MII_TXD3,T2 as MII_TXD2 but J18 as MII_TXD0 and J19 as MII_TXD1 ata the same time.

    So are the MII_RXD pins.

    Thanks for answering me.