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.

AM6442: Enabling ICSS-EMAC, Enet(ICSS) and EthPhy on Sysconfig

Part Number: AM6442
Other Parts Discussed in Thread: SYSCONFIG

Hi , 

I want to use the ICSS-EMAC API to send and receive frames on one of the Ethernet ports.
The goal is to make the EtherCAT SOEM stack work.

In SYS-config, I enabled ICSS-EMAC, Enet(ICSS) and EthPhy.

During the tests, it seems to me that the initialization is not complete. When sending a frame, an error is raised.

Initialization is performed as follows:

   pruicssHandle = PRUICSS_open(CONFIG_PRU_ICSS0);

   DebugP_assert(pruicssHandle != NULL);

 

   ICSS_EMAC_Params_init(&icssEmacParams);

   icssEmacParams.pruicssHandle = pruicssHandle;

   icssEmacParams.ethphyHandle[0] = gEthPhyHandle[0];

   icssEmacParams.pruicssIntcInitData = &PruInitData;

   icssEmacParams.fwStaticMMap= &EMCStatic;

   icssEmacParams.fwDynamicMMap= &EMACDynamic;

 

   /* Fill the icssEmacParams as needed */

 

   /*Use CONFIG_ICSS_EMAC0 (as configured in SysConfig) macro as parameter to ICSS_EMAC_open */

   port->sockhandle = ICSS_EMAC_open(CONFIG_ICSS_EMAC0, &icssEmacParams);

   DebugP_assert(port->sockhandle != NULL);

it leads to the error in icss_emac.c, ligne1243:

    if(queuePriority > ((uint8_t)(pDynamicMMap->numQueues) - (uint8_t)1U))

    {

        hostStatPtr->txDroppedPackets++;

        return ((int32_t)ICSS_EMAC_ERR_SWITCH_INVALID_PARAM);

error ICSS_EMAC_ERR_SWITCH_INVALID_PARAMis returned because numQueues is 0.

-> I think the sending service expects correct settings for icssEmacParams.fwDynamicMMap (in particular);

Documentation on this point is non-existent.

Can you share a code example ?

Regards

Geoffrey