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.

MSP-EXP432E401Y: MSP-EXP432E401Y

Part Number: MSP-EXP432E401Y

Tool/software:

Hi,

I am using  MSP-EXP432E401Y board. 

I want to connect it to my PC using STATIC IP . 

i downloaded "ethernet_with_lwip_MSP_EXP432E401Y_nortos_ccs" sample project from examples in code composer studio . This project is based on DHCP network protocol. TO convert it into static IP mode I did this modification in enet_lwip.c file :

 lwIPInit(g_ui32SysClock, pui8MACArray, 3232235777, 4294967040, 0, IPADDR_USE_STATIC);

But still i am unable to ping it through my system.

Please tell me what else modification is required to make this board work in static IP mode.

4294967040 is equal to 255.255.255.0 in string

and 3232235777 is 192.168.1.1 in string

my system IP is 192.168.1.5

 

  • Hi,

      You need to also set the below two macros to 0 in the lwipopts.h file. 

    #define LWIP_DHCP 0

    #define LWIP_AUTOIP 0

  • I did as you said above but when i build code its showing error "identifier "ARP_TMR_INTERVAL" is undefined ". This parameter is present in etharp.h file. but still its showing undefined.

  • Hello sir,

    I just took the "#define ARP_TMR_INTERVAL 1000 " parameter from etharp.h file and copied it into  lwiplib.c file. After building the code a warning is displayed " function "etharp_tmr" declared implicitly" . How can i remove this warning and how much  relevant this warning is??

    when i loaded and ran this code on card Ethernet port of card starting pinging from my laptop.

    Using arp -a commad i can see MAC and IP of card too.

    I also want to know how can ensure that modified code is  configured to STATIC IP mode properly because when i ran code on card wireshark tool is capturing packets of HTTP search though i have masked " httpd_init();" function enet_lwip.c file .

  • Hi,

     In the lwiplib.c file, can you add the header file. See below. 

    If you can ping the device at the specified static address then the static address is working. 

  • Thanks,

    Warning that was appearing during the build removed after adding header file.

    Now ,

    I want to to send and receive udp packets from MCU . How can i proceed for that in code??? Is there any example code for this???

  • Warning that was appearing during the build removed after adding header file.

    Glad that the warning is resolved. 

    I want to to send and receive udp packets from MCU . How can i proceed for that in code??? Is there any example code for this???

    Why are you rejecting my answer if the warning is resolved. Just because you have a new question for udp so you reject my answer for an earlier question? You should be opening a new thread if you have a new question and not  reject people's answer so you can continue with a new question on the same thread. 

    There is UDP example in TI Resource Explorer but this is based on RTOS. See below. 

    For bare-metal lwIP UDP example, there is none for MSP432E but you can reference this app note  https://www.ti.com/lit/pdf/spna248 The lwip examples are for TM4C129 MCU which is the same silicon as MSP432E. 

  • Can u share its "udp.h" file . I am not getting it inside spna248 folder that I downloaded from link provided by you above.

    Also i want to know that whether syntax wise code written for TM4C129 will be same as for MSP432E or not.

    Can i use user defined functions in TM4C129  for MSP432E too.

  • Sorry i was not rejecting your answer . I am using this platform for the first time . I was just trying to keep the thread open to keep the chat in continuation.

  • Hi,

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //*****************************************************************************
    //
    // enet_lwip.c - Sample WebServer Application using lwIP.
    //
    // Copyright (c) 2013-2017 Texas Instruments Incorporated. All rights reserved.
    // Software License Agreement
    //
    // Texas Instruments (TI) is supplying this software for use solely and
    // exclusively on TI's microcontroller products. The software is owned by
    // TI and/or its suppliers, and is protected under applicable copyright
    // laws. You may not combine this software with "viral" open-source
    // software in order to form a larger program.
    //
    // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
    // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
    // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
    // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
    // DAMAGES, FOR ANY REASON WHATSOEVER.
    //
    //
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I got udp.c and udp.h file . In enet_lwip.c file I added UdpEchoRecv, UdpEchoInit and udp_send_data function but still I am unable to see udp packet from MCU to my PC on wireshark tool

  • Hi,

      I have some questions.

      - What tool do you use to send udp data to the MCU? I normally use Hercules. https://www.hw-group.com/software/hercules-setup-utility. The UdpEchoRecv is a callback that is called when the Echo Server receives data. Upon receiving data, it simply echoes back to the sender (the client application running on the PC). Do you have data that is sent from the PC? What does it show?

      - Is your client on the same subnet as the server?

      - What is the result if you use DHCP? 

  • Hi,

    I made some modifications in code. Now in present case I am able to send packet from MCU to PC.  I checked that received packet on wireshark and Hercules too.

     When I am sending packet from PC (using hercules) to MCU then I can see packet on wireshark .

    On each packet send D3 LED of MCU is also blinking. But I don't know that whether packets are reaching to MCU or not and how to see those packets.

    I used UdpEchoRecv function and added code to print received messages. But when i am running that code and sending packet from hercules then nothing is printing on console of CCS. Also  inside UdpEchoRecv  there is a function  udp_sendto(pcb, p, addr, port) which should send same packet back to PC (hercules ) as an echo (acknowledgment), but there also I am not receiving any packet.

     I am sharing latest code file with you . Please see and guide how to solve this issue.

  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //*****************************************************************************
    //
    // enet_lwip.c - Sample WebServer Application using lwIP.
    //
    // Copyright (c) 2013-2017 Texas Instruments Incorporated. All rights reserved.
    // Software License Agreement
    //
    // Texas Instruments (TI) is supplying this software for use solely and
    // exclusively on TI's microcontroller products. The software is owned by
    // TI and/or its suppliers, and is protected under applicable copyright
    // laws. You may not combine this software with "viral" open-source
    // software in order to form a larger program.
    //
    // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
    // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
    // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
    // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
    // DAMAGES, FOR ANY REASON WHATSOEVER.
    //
    //
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • I'm confused where you call both UdpClientInit and UdpEchoInit in the main(). What are you trying to set up the MCU for? As a server or as a client? Why don't you start with the EchoServer example. In the enet_udpecho_server_lwip example, the MCU is a server and the PC is the client. The PC first sends message to the server and the server will echo back what it receives. 

  • Hi sir,

    I am using it as client and server both. I want to send and receive packet through this MCU.

    I made few more changes and now i am able to send and receive packet from MCU. But there are few warnings in code. I am sharing it with. Please tell how to resolve them.

    1)  Description    Resource    Path    Location    Type
    #1219-D arithmetic on pointer to void or function type    enet_lwip.c    /ethernet_with_lwip_MSP_EXP432E401Y_nortos_ccs    line 278    C/C++ Problem

    2)  Description    Resource    Path    Location    Type
    #169-D argument of type "struct ip_addr *" is incompatible with parameter of type "const ip_addr_t *"    enet_lwip.c    /ethernet_with_lwip_MSP_EXP432E401Y_nortos_ccs    line 178    C/C++ Problem

    3) Description    Resource    Path    Location    Type
    #169-D argument of type "void (*)(void *, struct udp_pcb *, struct pbuf *, struct ip_addr *, u16_t)" is incompatible with parameter of type "udp_recv_fn"    enet_lwip.c    /ethernet_with_lwip_MSP_EXP432E401Y_nortos_ccs    line 316    C/C++ Problem

  • Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //*****************************************************************************
    //
    // enet_lwip.c - Sample WebServer Application using lwIP.
    //
    // Copyright (c) 2013-2017 Texas Instruments Incorporated. All rights reserved.
    // Software License Agreement
    //
    // Texas Instruments (TI) is supplying this software for use solely and
    // exclusively on TI's microcontroller products. The software is owned by
    // TI and/or its suppliers, and is protected under applicable copyright
    // laws. You may not combine this software with "viral" open-source
    // software in order to form a larger program.
    //
    // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
    // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
    // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
    // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
    // DAMAGES, FOR ANY REASON WHATSOEVER.
    //
    //
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • 1)  Description    Resource    Path    Location    Type
    #1219-D arithmetic on pointer to void or function type    enet_lwip.c    /ethernet_with_lwip_MSP_EXP432E401Y_nortos_ccs    line 278    C/C++ Problem

    2)  Description    Resource    Path    Location    Type
    #169-D argument of type "struct ip_addr *" is incompatible with parameter of type "const ip_addr_t *"    enet_lwip.c    /ethernet_with_lwip_MSP_EXP432E401Y_nortos_ccs    line 178    C/C++ Problem

    3) Description    Resource    Path    Location    Type
    #169-D argument of type "void (*)(void *, struct udp_pcb *, struct pbuf *, struct ip_addr *, u16_t)" is incompatible with parameter of type "udp_recv_fn"    enet_lwip.c    /ethernet_with_lwip_MSP_EXP432E401Y_nortos_ccs    line 316    C/C++ Problem

    Are these warning or errors? Are you sure the line numbers you show for example like 278  match your source code?

    I am using it as client and server both. I want to send and receive packet through this MCU.

    As I mentioned, why don't you start with one at a time making sure each (either as a sever or as a client) works first.

  • hi

    Sir these are warnings not error. line numbers are not correct. I think line numbers are changing after the upload process. 

    I am sharing code again.

    Following are the lines showing error

     1) " err = udp_connect(upcb, &ServerIPaddr, SERVER_PORT)"

    Warning :   

    Description    Resource    Path    Location    Type
    #169-D argument of type "struct ip_addr *" is incompatible with parameter of type "const ip_addr_t *"    enet_lwip.c    /ethernet_with_lwip_MSP_EXP432E401Y_nortos_ccs    line 180    C/C++ Problem

    2) " udp_sendto(pcb, b, addr, port); " 

    Warning :

    Description    Resource    Path    Location    Type
    #169-D argument of type "struct ip_addr *" is incompatible with parameter of type "const ip_addr_t *"    enet_lwip.c    /ethernet_with_lwip_MSP_EXP432E401Y_nortos_ccs    line 287    C/C++ Problem

    3)  " udp_recv(pcb, UdpEchoRecv, NULL); "

    Warning :

    Description    Resource    Path    Location    Type
    #169-D argument of type "void (*)(void *, struct udp_pcb *, struct pbuf *, struct ip_addr *, u16_t)" is incompatible with parameter of type "udp_recv_fn"    enet_lwip.c    /ethernet_with_lwip_MSP_EXP432E401Y_nortos_ccs    line 322    C/C++ Problem

    And One more query If I use this Micro-controller in my design then which JTAG should I use to program it.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    //*****************************************************************************
    //
    // enet_lwip.c - Sample WebServer Application using lwIP.
    //
    // Copyright (c) 2013-2017 Texas Instruments Incorporated. All rights reserved.
    // Software License Agreement
    //
    // Texas Instruments (TI) is supplying this software for use solely and
    // exclusively on TI's microcontroller products. The software is owned by
    // TI and/or its suppliers, and is protected under applicable copyright
    // laws. You may not combine this software with "viral" open-source
    // software in order to form a larger program.
    //
    // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
    // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
    // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
    // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
    // DAMAGES, FOR ANY REASON WHATSOEVER.
    //
    //
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • The udp example I gave you before was based on lwip 1.4.1 version while the MSP432E SimpleLink SDK uses a new version of the lwip stack. See below comparison where the left side is the udp_connect for MSP432E and the right hand side is the older 1.4.1 version. 

    And One more query If I use this Micro-controller in my design then which JTAG should I use to program it.

    You can use XDS110 which is already built into to the MSP-EXP432E401Y LaunchPad. If you want to use an external debug probe, you can use popular and low cost probes like XDS110 and XDS200. See below supported probes. The ones highlighted in yellow are the popular ones.