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.
HI,
I'm using TMS570LC4357 development kit, I trying to implement TCP/IP client and server. is there any example tcp/ip lwip code for tms570lc4357? and settings in HALCoaGen.
kindly share.
Thank you
Basavanagouda
Hi,
I used echo port number 7, is echoing back. I did change port number to 6000 and try to send some data from the server after connecting to client.
sever able receive data from client it's not replying back.
1. Is there any change i need to make in code.
Below I'm attaching my code.
kindly walk through and reply
Thank you
Basavanagouda
Hi Basavanagouda,
Did you get the webserver example from HalCoGen to work? Not sure if you took the echo server from Mr. Jongsong Kim in the earlier reply as a starting point?
Our expertise in ethernet echo server is kind of limited. But looking at your code I find that you disable the EMACSwizzleData() in the HL_emac.c. The EMACSwizzleData() is needed for TMS570LC4357 device because there is an errata when writing to the CPPI RAM. LC4357 is a big endian device while you declare the device as little. Please change the __little_endian__ and __LITTLE_ENDIAN__ to 0 and try again and see if it makes a difference. Please go to HL_sys_common.h to change them.
uint32 EMACSwizzleData(uint32 word) { #if ((__little_endian__ == 1) || (__LITTLE_ENDIAN__ == 1)) return word; #else return (((word << 24U) & 0xFF000000U) | ((word << 8U) & 0x00FF0000U) | ((word >> 8U) & 0x0000FF00U) | ((word >> 24U) & 0x000000FFU)); #endif }
HI Charles,
It's my coding issue, not in EMACSwizzle. I missed callback function.
One more thing i need a suggestion, I'm using TMS570LC4357 development kit I tried code the kit with below links instructions(HALCoGen settings),
http://processors.wiki.ti.com/index.php/HALCoGen_Ethernet_Driver_and_lwIP_Integration_Demonstration
http://processors.wiki.ti.com/index.php/LAUNCHXL2_570LC43:_lwIP_Demo
But board is showing initialization error.
I used the Build demo code from the hercules folder,import the dil file to HALCoGen and i did not change any settings in HALCoGen and its working fine.
1. Those instruction only for launch pad?
If I search in Google and E2E form i got only those links for my question. I'm thinking those HALCoGen settings only for Launch PAD and not for tms570lc4357 development kit
AM i right?
Please give suggestion,
Thank you
Basavanagouda.
Jongsong Kim said:this is raw socket echo sample using lwip.
(Please visit the site to view this file)
Hi Kim,
I am using this example on my TMS570LC4357 and it works, but after some seconds (less than one minute) from my PC application (tried with Putty and with a custom labview application) I see the connection is closed. The firmware does not break in echo_error or echo_close function and in Wireshark I don't see FIN/ACK messages.
Any suggestion of what I am missing?
Thank you
Arianna
Thank you for the tip..
I found my error, I changed the example to use static IP address, so I have to change also my PC IP to be static, otherwise the connection seems to fall down after 30-50 seconds.
I hope that this information can be helpful to someone lost like me! :)
Cheers
Arianna