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.
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