We have been struggling to get SYS/BIOS running with NDK on a AM3352 system. We finally got the MAC address to come up with values close to what it should be by moving the AddNetifEntryFn() call before the start of SYS/BIOS. Previous code using lwip needed to be run after SYS/BIOS was running so that we had access to Task_sleep calls.
We set up the MAC configuration as follows:
config.phyAddr[0] = 2;
config.phyAddr[1] = 3;
config.numberPorts = 2;
config.resvd = 0;
config.macModeFlags = CPSW_CONFIG_MODEFLG_GIGABIT | CPSW_CONFIG_MODEFLG_FULLDUPLEX;
SetMacConfiguration(&config);
if(AddNetifEntryFn(CPSW_NETIF_INIT) == 0)
BIOS_exit(0);
When the code is run the MAC address of BC:6A:29:57:BD:1B (CPSW Port 0) is shown(AM335x register 0x44E10630 & 34). Our system actually uses Port 1(0x44E10638 & 3C) so we tried several changes to the SetMacifEntryFn() config to see id the code would use Port 1, but it never did. Any suggestions on how to get the CPSW NDK build to use Port 1's MAC?
Thanks,
John C.