CCS Version: 9.3.0.00012
pdk_am57xx_1_0_17
ndk_3_61_01_01
TMDSIDK574
Hello,
I tried to make a project out of NIMU_DualMacExample_idkAM574x_armExampleproject.txt in PDK.
I was able to build this project and it works, but some of the behavior is strange.
It is that when some packets are received from one I/F, they pass through to the other I/F.
I read the AM574x Technical Reference Manual (SPRUIH8B), and in section 25.12.4.8.2 Address Lookup Engine (ALE), it says
"The ALE may be configured to operate in bypass mode by setting the ALE_BYPASS bit in the ALE_CONTROL register.
When in bypass mode, all CPGMAC_SL received packets are forwarded only to the host port (port 0). "
I found this written.
So I checked the PDK source file. I found the following part in cspw_nimu_eth.c
#if defined (SOC_AM335x) || defined(SOC_AM437x)
HW_WR_FIELD32((emac_cfg.ale_base + CPSW_ALE_CTRL),
CPSW_ALE_CTRL_BYPASS, CPSW_ALE_CTRL_BYPASS_ENABLE);
#else
CSL_CPSW_enableAle((CSL_cpswHandle)emac_cfg.ss_base);
#endif
Since my IDK SoC is an AM5748, I determined that the bypass function is not enabled by this source.
However, this source is strange. In the #if clause, the bypass function is enabled, but in the #else clause, the ALE itself is enabled, so there is no balance.
I looked into it a bit more.
I found out that CSL_CPSW_enableAle((CSL_cpswHandle)emac_cfg.ss_base); is executed elsewhere.
This is my guess, but the above source is wrong and the correct one is
#if defined (SOC_AM335x) || defined(SOC_AM437x)
HW_WR_FIELD32((emac_cfg.ale_base + CPSW_ALE_CTRL),
CPSW_ALE_CTRL_BYPASS, CPSW_ALE_CTRL_BYPASS_ENABLE);
#else
CSL_CPSW_enableAleBypass((CSL_cpswHandle)emac_cfg.ss_base);
#endif
Isn't this the case?
Please let me know what you think.
There is also a chapter in SPRUIH8B called 25.12.4.8.5.2 Dual MAC Mode. It describes the procedure for configuring Dual MAC mode.
One of the operations is to set the ALE_VLAN_AWARE bit in the ALE_CONTROL register.
So I searched for the keyword ALE_VLAN_AWARE in all the PDK and NDK sources, but none of them manipulate the ALE_VLAN_AWARE bit.
Is this not necessary?
If it is necessary, I would be happy to see an example of a sample source, since the procedure in chapter 25.12.4.8.5.2 is not very specific.
Of course, if there is any other process required to configure Dual MAC, please let me know.
Regards,
Satoru