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.

SYSBIOS+LWIP+DUAL MAC mode problem

Other Parts Discussed in Thread: SYSBIOS, AM3359

Hello TI,

This week I built up a project with sysbios+lwip on sitara am3359 custom board acccording to the example in sysbios ind sdk version 1.1.0.4. I tried to put the emac to run under DUAL MAC mode. But when I run this project both of the port can finish the auto-negotiation, But only port 1  can be able to get the IP address from my switch. Port 2 never get the IP address from the switch.

I also tried to connect two port to two different switch (which belong to two different network segments). ALso the same thing happen. Looks like the port 2 is not configure currectly in ALE table or switch module. Can any one give me some suggestion? Is the DUAL MAC mode usable in this version of ind sdk?

Thank you very much!!

By the way,my software is like this:

CCS version 5.5.00077

SYSBIOS version 6.35.4.50

IND SDK version 1.1.0.4

  • The enetlwip_sysbios example only supports a single port and mac. Starterware supports dual mac though, you can refer that implementation to enable the sysbios app(use the standalone starterware package, not the one available with Industrial SDK).

    Regards,
    Vinesh

  • Hello Vinesh,

    Thank you for your quick reply! I will download the updated starterware and check out the difference of the inplemention. But Can I just change base on my implemention before ? Cause I am not very clear about what should be add to make lwip compatible with sysbios

  • The main differences are in the cpswif.c . You will have to compare and enable what is required for dual mac. I think the sources are available already in the Industrial SDK, but it would be good if you compare with a working application.

    Regards,
    Vinesh

  • Hi Vinesh,

    OK.Thank you very much! Here is already at night in China. I will check out the difference in code tonight and try it on hardware tomorrow!

  • Hi Vinesh,

    Thank you and Good news! After I checking the difference, I found the only one point that matters, it is here:

    #ifndef sys_bios_ind_sdk
    /* ISDK example works over single port only. Enabling second port is not required */
    CPSWALEPortStateSet(cpswinst->ale_base, 2, CPSW_ALE_PORT_STATE_FWD);
    #endif

    in sdk lwip cpswif.c, The forward function on port 2 is disabled by default. So I just change to 

    //#ifndef sys_bios_ind_sdk
    /* ISDK example works over single port only. Enabling second port is not required */
    CPSWALEPortStateSet(cpswinst->ale_base, 2, CPSW_ALE_PORT_STATE_FWD);
    //#endif

    Every thing is OK. But two port can only connect to two different network segment. But this dos not matter.

    Thank you again!