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.

CPSW question

Hi Sir :

I work on TI AM335x platform, the tools's version are as below.

CCS V6

am335x_sysbios_ind_sdk_1.1.0.8

bios_6_41_04_54

ndk_2_24_01_18

xdctools_3_30_06_67_core

As I know, the Ethernet package is captured by CPSW interface using interrupt.

However, in our custom board, we do not want to use CPSW interface.

In other words, the Ethernet package comes from other interface.

My question is how do I bypass Ethernet package to AM335x using the same function for example cpswif_rx_inthandler()?

Could anybody give me some suggestion?

Or guide me how to find the solution.

Best regards,

Marcus 

  • Hi Marcus,

    This appears to be a duplicate of your other post.

    As Frank mentioned there, you need to write a NIMU driver to handle incoming/outgoing Ethernet frames from whatever hardware interface you intend to use for your networking communications.  The driver must communicate to the NDK through the NIMU layer.

    While I am not too familiar with the CPSW driver that you have with the industrial SDK, there should be a call to NIMURegister() that is used as part of the initialization process between the driver and the NDK.  That call tells the NDK what the names of various functions are that live in the driver - e.g. start, stop, poll, etc., so that the NDK can call them when appropriate.  You can find more information on how to write a NIMU driver in the following document (ships with the NDK): sprufp2a.pdf

    As far as the function “cpswif_rx_inthandler()” and how to omit that, as well as stripping out the rest of the driver, the Industrial SDK team will need to advise the exact steps for that.

    Steve

  • Hi Marcus

    In the ISDK 1.1.0.8 there is an EthernetIP driver example that is designed to be built for both CPSW and PRU based Ethernet. This may be closer to the configuration you wish to implement.
    EtherNet/IP is CIP implemented over plain EtherNet and TCP/IP. There is a link in the user guide on how to implement an ethernet switch. There are also a number of posts on resolving some issues that people have encountered as the Ethernetip example was adapted to plain Tcp/Ip in a TIRTOS project:

    e2e.ti.com/.../1404124
    e2e.ti.com/.../406303
    e2e.ti.com/.../395190

    In the latest Industrial SDK - SYSBIOSSDK-IND-SITARA ver 2.1. there have been a number of improvements that may assist you in your development. This release is available at:
    downloads.ti.com/.../index_FDS.html

    In this release there is an Ethernet MAC example. This is an Ethernet Dual mac implementation that runs on top of the ICSS EMAC driver and uses NDK as TCP/IP stack. The application can be modified to run as single MAC.

    The Ethernet examples use the ICSS EMAC LLD (ICSS EMAC Driver) and PRU ICSS LLD .
    The ICSS EMAC LLD is an Ethernet driver implementation over PRU-ICSS with the help of PRU firmware. This driver has APIs which enable communication between any High Level Driver/Application and EthernetIP or Profinet firmware. The ICSS EMAC Driver can support both EMAC mode and Switch mode (depending on the firmware loaded to PRU-ICSS).
    The ICSS EMAC LLD developers guide is available at :
    processors.wiki.ti.com/.../ICSS_EMAC_LLD_developers_guide
    The ICSS EMAC LLD Debug guide is available at:
    processors.wiki.ti.com/.../ICSS_EMAC_LLD_debug_guide

    The PRU ICSS Low Level Driver provides the application/drivers to interface with the PRU Subsystem. This module has APIs which can be used to initialize PRU, load firmware and configure PRU-ICSS INTC etc.

    David
  • Hi David :

    Thanks for your reply!

    However, I think that is not what I want, if I am wrong, please correct me.

    In our hardware, there is a external chip that handle Ethernet package and pass information to AM335x using SPI interface.

    So, I do not use MAC interface to receive Ethernet package, I just use SPI interface to get TCP/IP package.

    So, my question is if I can use lwip function that using SPI interface.

    I have found out a solution called "lwIP_over_spi" on internet, however I can not get complete source code.

    I think maybe it is the solution that I want.

    If you have idea about lwip over SPI, please also let me know.

    Best regards,

    Marcus