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.

How to use two network interface simultaneously?

Hi,
My platform is TMDSEVM6472,ccsv4,DSP/BIOS 5.41.10.36.
The NDK'example shipped with TMDSEVM6472 only use one port(prot0 or port1), 
in my application I need two network interface ports,one connect to GigE Camera,and another connect to computer's network interface.
use the "helloworld" for a example,where should I change or add to satisfy my require?
        Does Nimu_eth.c?
Thank you !
  • Hi,

              Anybody answer my question?thanks very much!

  • Hi Anderson,

    Are you using the MCSDK? If so, which version?

    Do you need to run NDK in your application on multiple cores, with each core using one EMAC port? Or only run NDK on one core but use two EMAC ports?

    Steve

  • Hi,Steve

                  Thank you for your help!

                  I have not use the MCSDK at present, just use one core,but use two EMAC prots,   I think i will use multicore in the future,one core control one EMAC port.

  • Anderson,

    Ok,I was wondering about the MCSDK because the C6472 Ethernet driver was updated in the MCSDK, and so is newer and slightly different than the versions of the Ethernet drivers that shipped in NDK 2.0 and 2.01. 

    Anyway, I think what you need to do is use the NIMU APIs to register the second Ethernet port.  Do you know if it is the same PHY for both ports on that board?  If so, you should be able to just repeat what the driver code does for the first Ethernet port, but update the code to use the 2nd Ethernet port's MAC address and also register it with NIMU as a different interface.  You should see somewhere in the driver code an initalization function where the NIMURegister() function is called where that's being done.

    Furthermore, as another example of how to register another device with NIMU, you could look at the code for VLAN (virtual LAN), found in the stack source vlan.c).

    The function VLANAddDevice() allocates a new NETIF_DEVICE and registers it with NIMU.  That device is then used when sending and receiving data over the VLAN device.

    Lastly, you can find more info on NIMU in the NDK API Reference Guide.

    Steve

  • Hi,Steve

               Thank you !

               I will try it in this way!