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.

RM46L852: RM46L852 Ethernet data communication with RM46L852ZWT EV KIT

Part Number: RM46L852
Other Parts Discussed in Thread: TMDXRM46HDK, HALCOGEN

I am using RM46L852ZWT EV KIT, TMDXRM46HDK
I downloaded the source code from the GIT address and tried to run it.

git.ti.com/.../lwip-1.4.1

The result shows that Hardware init failed as follows.

HERCULES MICROCONTROLLERS
Texas Instruments
Little Endian device
Initializing ethernet (DHCP)
DEBUG - Getting PHY ID....SUCCESS
DEBUG - Getting PHY Alive Status...SUCCESS
DEBUG - Getting PHY Link Status...SUCCESS
..DONE


-------- ERROR INITIALIZING HARDWARE --------

If you look at the ethernet operation video on YouTube, the server address comes out after initialization, and you can connect to it from your PC.
www.youtube.com/watch

I would like to know if there is anything I need to check in the source code or on my PC, or if there are any additional settings I need to make.

The last thing I need to do is to communicate 100 bytes with the PC via Ethernet every 10ms.

I would also like to request a test code for Ethernet data communication.

  • Instead of DHCP,  to use a static address, I changed the ip to 192.168.0.99 as follows

    uint8 ip_addr[4] = { 192, 168, 0, 99 };
    uint8 netmask[4] = { 255, 255, 255, 255, 0 };
    uint8 gateway[4] = { 192, 168, 0, 99 };
    ipAddr = lwIPInit(0, macAddress,
    *((uint32_t *)ip_addr),
    *((uint32_t *)netmask),
    *((uint32_t *)gateway),
    ipaddr_use_static);

    After that, I received the following message that the wen server was successfully executed.

    hercules microcontrollers
    Texas Instruments
    Little Endian device
    Initializing ethernet (DHCP)
    DEBUG - Getting PHY ID....SUCCESS
    DEBUG - Getting PHY Alive Status...SUCCESS
    DEBUG - Getting PHY Link Status...SUCCESS
    DEBUG - Setting up Link...SUCCESS
    ..DONE
    Starting Web Server..DONE

    hercules microcontrollers
    Texas Instruments
    Little Endian device
    Device IP Address: 99.0.168.192
    Webserver accessible @ http:
    99.0.168.192

    However, I can't connect to the server at that address from my PC.
    I would like to know what I need to do to connect to the web server.


  • I changed the IP ADDRESS setting to the following, changed RMII -> MII from HALCOGEN, and successfully connected to the webserver.
    I need to send and receive 100byte data to and from PC every 10ms, if there is any relevant example source, please provide it.

    uint8 ip_addr[4] = { 99, 0, 168, 192 };
    uint8 netmask[4] = { 0, 255, 255, 255 };
    uint8 gateway[4] = { 99, 0, 168, 192 };
    ipAddr = lwIPInit(0, macAddress,
    *((uint32_t *)ip_addr),
    *((uint32_t *)netmask),
    *((uint32_t *)gateway),
    IPADDR_USE_STATIC);

  • Hi Jaehyeuck,

    Apologies for the late reply.

    Actually couple hardware settings will decide the PHY to operate either in MII or RMII mode. Refer below thread to know them.

    (+) TMS570LS1227: TMS570LS12HDK + lwIP library: RMII/MII question - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

    May be in your hardware the settings might tuned to the MII mode.

    I changed the IP ADDRESS setting to the following, changed RMII -> MII from HALCOGEN, and successfully connected to the webserver.
    I need to send and receive 100byte data to and from PC every 10ms, if there is any relevant example source, please provide it.

    We don't have any example to meet this exact requirement.

    You have to modify the active web server example available in git hub to meet your requirement.

    httpserver_raw « apps « lwip-1.4.1 « v00.04.00 « LwIP « Application - hercules_examples/hercules_examples - Software Examples for Hercules Processors

    --

    Thanks & regards,
    Jagadish.

  • Hi. Jagadish.


    Thanks for your reply.

    A few bytes would be great, so I'd like a hint on the example code or method to communicate data with the PC, not the source code to run the server.

    Or, If you have socket communication example, please share me.

    Thanks & regards,

    Jaehyeuck.

  • Hi Jaehyeuck,

    We don't have any example related to sending smaller data on http protocol. We have an example on TCP and UDP to send smaller data.

    As per my understanding of the http code, you can use the "http_write" function to send smaller amounts of data

    And to know how to use this function to send smaller data, you can refer the function "http_send_headers"

    By referring this function you can understand how here we are providing required arguments to the function "http_write"

    --

    Thanks & regards,
    Jagadish.