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.

AM6548: Using EMAC driver in MII mode on AM6548 SR2.0

Part Number: AM6548

Hello All,

I have a question related to the EMAC driver support in new RTOS SDK 7.01 that someone from TI can help to answer.

Earlier we used specially modified EMAC driver and ICSSG FW to support MII mode with AM6548 SR2.0 version in TIROTS SDK 6.03.
e2e.ti.com/.../938752
Now, we plan to swtich to new RTOS SDK 7.01 for AM6548 and I noticed that EMAC driver is almost identical to the one we currently use.

Is it possible now to build ICSSG FW for AM6548 SR2.0 (PG2) version in RTOS SDK 7.01's EMAC driver (we need MII mode)?
I don't see that this is possible now (only prebuilt FW exists) but maybe I am missing something...

Best regards,
Milan

  • Hi Milan,

    Sorry for the delay in response.

    For SR 2.0, new firmware is provided in binary form with built-in MII mode support under the bin_pg2 folder. Unfortunately firmware sources are not available at the moment.

    To enable MII mode support in EMAC you need to enable MII_SUPPORT macro in this file

    If you are using a custom board then pay particular attention to the pinmuxing. Some changes may be required for the SR 2.0 HW. See the section Section 7 of this AM65 IDK User Guide 

    Regards

    Vineet

  • Hello Vineet,

    Thank you on the reply.
    Yes I am using custom board so before I can test anything we have to port all the changes we made to support our custom board from SDK 6.3 to SDK 7.01 so this will take some time.

    I also have another question. I see that in emac loopback example \ti\drv\emac\test\EmacLoopbackTest\test_utils_k3.c EMAC_MODE_INTERRUPT is not used for PG2 (Lines 2012-2026).

        if (gPgVersion != APP_TEST_AM65XX_PG1_0_VERSION)
        {
            pollModeEnabled = 1;
            if (app_test_emac_open(EMAC_MODE_POLL) != 0)
            {
                while(1);
            }
        }
        else
        {
            if (app_test_emac_open(EMAC_MODE_INTERRUPT) != 0)
            {
                while(1);
            }
        }

    Is the interrupt mode still not supported for dual mac on PG2?

    Best regards,
    Milan

  • Hello Milan,

    from experience I can tell you that interrupt mode is still not supported on SDK 07.01 w/ drv/emac and SR2.0 hardware, see this thread: https://e2e.ti.com/support/processors/f/791/t/973648

    Regards,

    Dominic

  • Hi Milan,

    Interrupt mode with EMAC is currently not supported for SR 2.0 HW. Plan is to address this with ENET-LLD changes in future release.

    See my reply here

    Are you able to get MII mode to work with SR 2.0 HW ?

    Regards

    Vineet

  • Hello Vineet,

    Sorry for the late reply.
    Yes we had MII mode working on SR2.0 HW.
    We used SDK 6.03 but with special TI provided EMAC driver (which is almost identical to the one in SDK 7.01)

    You can find detaled conversation with Dave Bell from TI on this topic here :
    https://e2e.ti.com/support/processors/f/791/t/938752

    We still did not commit to porting our changes to SDK 7.01 as we first want to have SMP support working.

    https://e2e.ti.com/support/processors/f/791/t/917390


    Best regards,
    Milan

  • Hi Milan,

    Understood.

    Can we close this thread as it pertains to MII mode support ? We can open it again if there are issues on SDK 7.01 once SMP issue is resolved.

    I am looking at the SMP support issue.

    Regards

    Vineet

  • Hello Vineet,

    Thanks. Yes we can close it.

    However, I just want to point one thing regarding the emac_poll(port_num, p_info) function of EMAC driver that is used to poll for link state.
    We use it in a background task to periodically check for link state.
    Currently if called when link state is unchanged and it is Up it returns incorrect value in p_info->link_status field (actually leaves whatever value it had).

    This is due to function emac_poll_v5_icssg_dual_mac(uint32_t portNum, EMAC_LINK_INFO_T* p_info) in \packages\ti\drv\emac\src\v5\emac_drv_v5_dual_mac.c 

    Here, p_info->link_status is only updated if there is a link change so I added:

    p_info->link_status = emac_mcb.port_cb[portNum].MdioDev.linkStatus;

    below the line:

        if (p_info==NULL)
        {
            result = EMAC_DRV_RESULT_POLL_ERR;
        }
        else
        {
            p_info->link_status_change = FALSE;

    I can maybe remember link state in the application but this seems wrong.

    Also, If link is lost for a brief moment (between emac_poll() calls) and reestablished on both ports 2 and 3 during call of function EMAC_mdioTimerTick(emacMdioHandle hMDIO ) in \packages\ti\drv\emac\src\v5\emac_mdio.c 
    Line:         temp = CSL_MDIO_isUnmaskedLinkStatusChangeIntSet(mdioHandle, pd->regId); returns 1 only when called first time.

    So if you call it for port 2 it will report link status change but when called later for port 3 it will not and vice versa.

    Nothing of the above is a problem for us but I just wanted to let you know.

    Best regards,
    Milan

  • Hi Milan,

    Sorry for the delay.

    Thanks for the feedback, I will note it down. Please note that EMAC is getting deprecated and will be replaced with ENET LLD where this will be taken care of.

    Please check the SMP thread, I have an update there.

    I am closing the thread as per agreement.

    Regards

    Vineet