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.

AM4376: CPGMAC_SL recovery from IDLE

Part Number: AM4376

Hi,

I have question about the command IDLE of CPGMAC_SL.

IDLE state by setting CPSW_SL_MACCTRL.CMD_IDLE I understand that, but how is this to be released?
I cleared CPSW_SL_MACCTRL.CMD_IDLE using CCS(JTAG), but CPSW_SL_MACSTS.IDLE bit was unchanged.
What else do I need to do to recover from the IDLE state?

Best Regards,
H.U

  • Hi,

    I've reached out to the IP Designer for feedback on this issue.

  • Hi,

    What is the bus state when you are setting the idle bit? Is there traffic?

    What is the bus state when you are attempting to resume from suspend? Traffic?

  • Hi DK,

    Thank you for your reply.

    No packet transmissions have been performed after the CPSW module is initially set up.
    Also, there is no packet reception because the LAN cable is not connected.

    Best Regards,
    H.U

  • Are the module clocks running?

  • If the port has never gotten to the link up state, it is possible that the ALE.ALE_PortCtl.PortState is still in the disabled state.

    Normally the driver will wait for a link to be reported via MDIO operations and then setup the CPSW.MAcControl followed by ALE.ALE_PortCtl.Portstate to one of the active state depending on if there is spanning tree SW running or not..

  • Hi Denis,

    The IDLE of CPSW_SL_MACSTS Register remains at 1 and does not go to 0, even though it is linked up.
    Note that MDIO is enabled and the MDIO_LINK Register is b'101, so the two PHYs are in the linked state.

    Also, their board uses RMII and the CTRL_GMII_SEL Register is as follows.

     RMII2_IO_CLK_EN = 1
     RMII1_IO_CLK_EN = 1
     GMII2_SEL=b'01; RMII Mode
     GMII1_SEL=b'01; RMII Mode

    At link-up, the state is 100B FULL and the setting of CPSW_SL_MACCTRL registers is as follows

     GIG_FORCE =0
     IFCTL_B=1: 100Mbps operation
     IFCTL_A=1: 100Mbps operation
     CMD_IDLE=0: Idle not commanded
     GIG=0: 10/100 mode
     GMII_EN=0;
     LOOPBACK=0:Not looped back
     FULLDUPLEX=1;Full duplex mode 

    Are there any other factors that may prevent from returning from IDLE?

    Best Regards,
    H.U

  • Unless the gmii_en is set, the MAC has not be started, so the idle function does not apply!

    For the RMII to be retuned back to functional mode, the GMII_EN must be set back to a '1'.

  • Hi Denis,

    Thank you for your support.

    They were able to confirm that the CPSW_SL_MACSTS.IDLE is 0 when they set GMII_EN = 1.
    However, this bit seems to go back to "1" immediately. Is this the expected behavior?
    In addition, this behavior seems to be unrelated to the Linkup of PHY.

    Or, is there a way to keep CPSW_SL_MACSTS.IDLE at 0 (non-IDLE)?


    Best Regards,
    H.U

  • CPSW_SL_MACSTS.IDLE is an indicator that the MAC is idle currently not transmitting or receiving.

    It is unrelated to the link status.