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.

TMDSIDK437X: EtherNet/IP demo

Expert 1130 points
Part Number: TMDSIDK437X

Hi

I am adding Ethernet IP capability to my project and have started with the idk am437x ethernet ip example project : ethernetip_adapter_am437x_arm

I was able to perform project create proccess , successful compile the code and connect via uart.

at boot , the firmware UART indicates that it is using IP 255.255.255.255

I connect the laptop to the am437x IDK and get one green led and one flashing green led

When I try to use the EIP tool and enter this address in the "station" text box , I am unable to find the device.

can you help me get this demo running

1) can I get the binaries - to help make sure no issue woth compilation\PDK etc ?

2) is there a special configurations I should do on the PC side ? what should I see when I run IPCONFIG ?

3) Do I need to edit subnext mask ? if so , how to I do that : while the UART interface seems to supports changing the ip address, I could not find how do I change the subnet mask

4) I have experience with the TI Ethercat demo that allows toggling LEDs via Twincat. is there a similar demo with Ethernet IP ? i

Thanks

R2

  • Hello,

    1) You can get the pre-built binary here - https://software-dl.ti.com/processor-industrial-sw/esd/PRU-ICSS-ETHERNETIP-ADAPTER/latest/index_FDS.html

    2)  You need update the board IP address to be in the same subnet of your PC NIC.

    3)  No.

    4)  No, you can test the EIP objects using the EIP tool, see https://processors.wiki.ti.com/index.php/ICSS_EIP_Adapter_Developer_Guide#Molex_EIP_Tool

    or use a PLC to test I/O connection -https://processors.wiki.ti.com/index.php/ICSS_EIP_Adapter_Developer_Guide#Communication_between_EtherNet.2FIP_Adapter_and_Scanner_devices

    Regards,

    Garrett

  • Thanks for your help, but I still unable to connect with the IDK :

    I connect the idk to a rounter.

    At the function EIPAPP_getInitParams(ICSSEMAC_Handle eipicssEmacHandle) I changed the code to reflect ip address of 

     

    192.168.1.100

    and subnet mask of 

    255.255.255.0

    (see highlighted changes below)

    which should match the attache ipconfig setup

    While I see in the uart terminal the expected IP address ,  it does not connect , and when I ping it I get timeout

    ( leds in sitara are one green and one flashing green)

    any idea how to proceed ?

     

    the modified code:

    EIP_BOOL EIPAPP_getInitParams(ICSSEMAC_Handle eipicssEmacHandle)
    {
    uint16_t incarnId = 0;
    /*Allocate memory for PTP Object*/
    /* Read TCP/IP config stored in SpiFlash */
    Board_flashRead((Board_flashHandle)flashHandle, SPI_EEPROM_DEVICEIP_OFFSET,
    (uint8_t *)& eipDevInitConfig.tcpipConfig, sizeof(EPROM_TCPIP), NULL);

    /*IF IP from flash is 0x0 start in DHCP mode*/
    eipDevInitConfig.tcpipConfig.deviceIP = 0;


    if(!eipDevInitConfig.tcpipConfig.deviceIP)
    {
    eipDevInitConfig.tcpipConfig.startupType = EIP_STARTUP_DHCP;
    }

    /* Read ACD Enable bit stored in SpiFlash */
    Board_flashRead((Board_flashHandle)flashHandle, SPI_EEPROM_ACD_OFFSET,
    (uint8_t *)& eipDevInitConfig.acdEnable, sizeof(EIP_BYTE), NULL);
    /* Read Ethernet Link Config stored in SpiFlash */
    Board_flashRead((Board_flashHandle)flashHandle, SPI_EEPROM_SPEED_OFFSET,
    (uint8_t *)& eipDevInitConfig.ethConfig[0], sizeof(ST_ETH_CONTROL), NULL);
    Board_flashRead((Board_flashHandle)flashHandle, SPI_EEPROM_SPEED_OFFSET,
    (uint8_t *)& eipDevInitConfig.ethConfig[0], sizeof(ST_ETH_CONTROL), NULL);
    /* Read ACD Conflict detectd bit from SPI Flash*/
    Board_flashRead((Board_flashHandle)flashHandle, SPI_EEPROM_ACD_CONFLICT_OFFSET,
    (uint8_t *)& eipDevInitConfig.acdConflictDetails,
    sizeof(CLASS_TCP_LAST_CONFLICT_DETECTED), NULL);

    Board_flashRead((Board_flashHandle)flashHandle, SPI_EEPROM_INCARN_OFFSET, (uint8_t *)&incarnId,
    sizeof(EIP_WORD), NULL);

    eipDevInitConfig.tcpipConfig.deviceIP = 0xC0A80164;
    eipDevInitConfig.tcpipConfig.networkMask = 0xffffff00;

    eipDevInitConfig.incarnNum = incarnId;

    if(eipDevInitConfig.acdEnable)
    {
    eipDevInitConfig.acdEnable = 1;
    }

    return EIP_TRUE;
    }

  • If i want to try the pre built binaries - how do i edit tge subnet mask? The ip address?

  • Why your ipconfig shows wireless connection? Have you tried to directly connect to the NIC in PC instead of the router?

    Yes, you can update the IP address in the pre-built binary through the command from UART console.

    Regards,
    Garrett

  • Hi Garret,

    I tried to use a direct PC to idk connection

    I have setup the laptop connection (see below) and used the pre-built binary

    But I had trouble changing the IP with the prebuild binary app

    do I need to enter 192.168.1.10 or 3232235786 (which is 0xC0A8010A) ? what is the subnet mask I should use ? I tried both , but but neither seems to work : when I ping 192,168.1.10 I get no response (timeout)

  • any updates on this one?

    in the past , I had issue running the ethercat pre-compiled stack demo as the tools in which the demo was compiled were xx.12 and the pdk I was working with is xx.17 (latest at that time). could this be related ?

  • Hello,

    >>do I need to enter 192.168.1.10 or 3232235786 (which is 0xC0A8010A) ? what is the subnet mask I should use ? 

    You just need to enter 192.168.1.10. The subnet mask 255.255.255.0 is OK.

    You must use the PDK xx.12 from PRSDK v5.1 as specified in the UG. http://software-dl.ti.com/processor-industrial-sw/esd/docs/indsw/ethernetIP_adapter/01_00_03/PRU_ICSS_EthernetIP.html#release-01-00-03

    Regards,

    Garrett