Change-1: Sysconfig generated file changes
Change-2: Enet Module interface removed
Enet-LLD sysconfig layer has been cleaned up to improve code readability by removing sysconfig API abstractions and statically initializing CPSW/ICSSG configurations and calling driver APIs directly.
The following new files are generated from sysconfig. Example makefiles have been updated to include these files:
| Generated File | Description |
|---|---|
| ti_enet_dma_init.h | Contains DMA structures and API definitions |
| ti_enet_dma_init.c | Contains DMA object initialization based on the DMA channel config settings in Sysconfig GUI |
| ti_enet_init.c | Contains global CPSW config and RM resource config initialization along with helper functions: - Global RM resource config is populated from an array defined in device specific .js files - Global CPSW config is populated from the Sysconfig GUI settings |
The following APIs have been removed from syscfg generated files:
| Removed API | Description |
|---|---|
| EnetApp_enablePorts() | Replaced by separate host/mac functions |
| EnetApp_openDmaChannels() | Inlined into main flow |
| EnetApp_openAllRxDmaChannels() | Inlined into main flow |
| EnetApp_openAllTxDmaChannels() | Inlined into main flow |
| EnetApp_doCpswOpen() | No longer needed, replaced with direct call to Enet_open() |
| EnetAppUtils_initResourceConfig() | Replaced with static config |
The following APIs have been added in syscfg generated files:
| New API | Description |
|---|---|
| EnetApp_enableHostPort() | Separate host port enable |
| EnetApp_enableMacPort() | Separate MAC port enable |
| EnetApp_getPhyAliveStatus() | Direct PHY status check |
| EnetApp_updateTxChInitCfg() | Direct TX channel config update |
| EnetApp_updateRxChInitCfg() | Direct RX channel config update |
| EnetApp_getCpswCfg() | Returns static CPSW config pointer |
| EnetApp_cpswInitMacAddr() | Static MAC address init |
| getAleModeFlags(), getAlePortMask() | Template helper functions |
| getIpNxtWhitelistCount(), getIpNxtWhitelistCount() | Template helper functions |
Enet module abstraction layer has been removed to meet functional safety standards by replacing generic EnetMod_Handle with specific typed handles (e.g., CpswAle_Handle, Mdio_Handle), eliminating function pointers and void pointers.
void *arg argument used in the function pointer of EnetPhy_Mdio structure has been changed to Mdio_Obj*EnetMod_Obj enetMod member in all module structures has been removed and its individual members have been expanded inlineEnetMod_Handle as below:| Module | Impacted APIs | Old parameters | New parameters |
|---|---|---|---|
| CPSW ALE | CpswAle_open, CpswAle_rejoin, CpswAle_ioctl, CpswAle_close, CpswAle_saveCtxt, CpswAle_restoreCtxt | EnetMod_Handle hMod, ... | CpswAle_Handle hAle, ... |
| CPSW CPTS | CpswCpts_open, CpswCpts_rejoin, CpswCpts_ioctl, CpswCpts_close, CpswCpts_saveCtxt, CpswCpts_restoreCtxt | EnetMod_Handle hMod, ... | CpswCpts_Handle hCpts, ... |
| CPSW HostPort | CpswHostPort_open, CpswHostPort_rejoin, CpswHostPort_ioctl, CpswHostPort_close, CpswHostPort_saveCtxt, CpswHostPort_restoreCtxt | EnetMod_Handle hMod, ... | CpswHostPort_Handle hPort, ... |
| CPSW MacPort | CpswMacPort_open, CpswMacPort_rejoin, CpswMacPort_ioctl, CpswMacPort_close, CpswMacPort_saveCtxt, CpswMacPort_restoreCtxt | EnetMod_Handle hMod, ... | CpswMacPort_Handle hPort, ... |
| CPSW Stats | CpswStats_open, CpswStats_rejoin, CpswStats_ioctl, CpswStats_close, CpswStats_saveCtxt, CpswStats_restoreCtxt | EnetMod_Handle hMod, ... | CpswStats_Handle hStats, ... |
| MDIO | Mdio_open, Mdio_rejoin, Mdio_ioctl, Mdio_close, Mdio_saveCtxt, Mdio_restoreCtxt | EnetMod_Handle hMod, ... | Mdio_Handle hMdio, ... |
| ICSSG Stats | IcssgStats_open, IcssgStats_rejoin, IcssgStats_ioctl, IcssgStats_close | EnetMod_Handle hMod, ... | IcssgStats_Handle hStats, ... |
| ICSSG TAS | IcssgTas_open, IcssgTas_rejoin, IcssgTas_ioctl, IcssgTas_close | EnetMod_Handle hMod, ... | IcssgTas_Handle hTas, ... |
| ICSSG TimeSync | IcssgTimeSync_open, IcssgTimeSync_rejoin, IcssgTimeSync_ioctl, IcssgTimeSync_close | EnetMod_Handle hMod, ... | IcssgTimeSync_Handle hTimeSync, ... |
| NullMod | NullMod_open | EnetMod_Handle hMod, ... , const void *cfg | NullMod_Handle hNull, ... , const NullMod_Cfg *nullModCfg |
| NullMod_rejoin, NullMod_ioctl, NullMod_close | EnetMod_Handle hMod, ... | NullMod_Handle hNull, ... | |
| EnetPhyMdioDflt | EnetPhyMdioDflt_isAlive, EnetPhyMdioDflt_isLinked, EnetPhyMdioDflt_readC22, EnetPhyMdioDflt_writeC22, EnetPhyMdioDflt_readC45, EnetPhyMdioDflt_writeC45 | ..., void *args | ..., Mdio_Obj *hMdio |
| EnetPhy | EnetPhy_open | ..., void *mdioArgs | ..., Mdio_Obj *mdioArgs |
EnetMod_Handle has been replaced with module specific handle type (e.g., CpswAle_Handle, Mdio_Handle)ENET_MOD() macro has been removedvoid* pointers has been updated to use Mdio_Obj* insteadChange-1 : ENET UDMA API changes
The ENET UDMA API has undergone some changes, with the primary goal of enhancing overall code quality and adhering to functional safety standards. These changes aim to minimize the use of error-prone constructs and eliminate the utilization of void pointers.
| Old API Header | New API Header |
|---|---|
| 1. Initialize RX channel open parameters: EnetDma_initRxChParams(void *pRxChCfg) | EnetUdma_initRxFlowParams(EnetUdma_OpenRxFlowPrms *pRxFlowPrms) |
| 2. Enet DMA open RX channel: EnetDma_openRxCh(EnetDma_Handle hDma, const void *pRxChCfg) | EnetUdma_openRxFlow(EnetDma_Handle hDma,const EnetUdma_OpenRxFlowPrms *pRxFlowPrms) |
| 3. Enet DMA close RX channel: EnetDma_closeRxCh(EnetDma_RxChHandle hRxCh, EnetDma_PktQ *fq, EnetDma_PktQ *cq) | EnetUdma_closeRxFlow(EnetDma_RxChHandle hRxCh,EnetDma_PktQ *fq,EnetDma_PktQ *cq) |
| 4. Initialize TX channel open parameters: EnetDma_initTxChParams(void *pTxChCfg) | EnetUdma_initTxChParams(EnetUdma_OpenTxChPrms *pTxChPrms) |
| 5. Enet DMA open TX channel: EnetDma_openTxCh(EnetDma_Handle hDma, const void *pTxChCfg) | EnetUdma_openTxCh(EnetDma_Handle hDma, const EnetUdma_OpenTxChPrms *pTxChPrms) |
| 6. Enet DMA close TX channel: EnetDma_closeTxCh(EnetDma_TxChHandle hTxCh, EnetDma_PktQ *fq, EnetDma_PktQ *cq) | EnetUdma_closeTxCh(EnetDma_TxChHandle hTxCh, EnetDma_PktQ *fq, EnetDma_PktQ *cq) |
Change-1 : ENET(CPSW) and ENET(ICSS) pinmux configuration.
Change-2 : Support to configure link parameters in Sysconfig GUI tool.
Change-3 : ENET(CPSW) and ENET(ICSS) Example paths have been changed.
Change-4 : Support to add and configure Ethernet PHY module through sysconfig-GUI tool.
In MCU+ SDK version of 10.01, ENET(CPSW) and ENET(ICSS) related examples showcasing various features have been moved from ${MCU_PLUS_SDK_PATH}/examples/networking to ${MCU_PLUS_SDK_PATH}/source/networking/enet/core/examples
The above change makes older build commands to build Networking examples no longer supported, and it has to be updated with correct path.
Please use "make help DEVICE=<dev_name>" to get the correct location and build commands for the examples.
In MCU+ SDK version of 10.01, support to add custom PHY and configure it through sysconfig tool has been added, and this needs updates in corresponding example.syscfg file to be compatible with latest changes
This will need addition of the corresponding sysconfig tool changes to add the ethernet phy module and configure it.
In MCU+ SDK version of 10.00, ENET(CPSW) and ENET(ICSS) component in Sysconfig GUI has been updated with fixes to correct MII/RMII mode for ICSSG and CPSW Resp.. Additionally support added to release unused pins based on number of ports were enabled in CPSW.
The above described change makes any older 'example.syscfg' generated using SDK version of 09.00 or earlier not compatible with SDK version 10.00 or later. This incompatibility is seen only when either ENET(CPSW) or ENET(ICSS) is added in your application/example.If neither of the components are added, you may ignore this change and there is no impact. User will see the error in sysconfig gui tool when the old example.syscfg file is opened in updated version of mcu plus sdk.
If it is possible to create an example.syscfg as per user configurations, please generate a new example.syscfg from any SDK example and change the configration as per your need. This is the safest option.
Sometimes, it is not easy to get a new example.syscfg that matches the older example.syscfg. In those case, please follow the below steps
Save the modifications. Then open sysconfig GUI tool with the modifications, save and close the tool.
In MCU+ SDK version of 10.00, parameters that configures link capabilities for auto negotiation such as speed and duplexity is added into syscfg GUI.
'EnetApp_initLinkArgs' function that is defined in the user applicaiton code is no longer called. Instead, a new function EnetApp_initLinkArgs is defined.