I used a F340+CP2201EB for simultaneous ethernet and UART communications. I got data from UART and relayed them to a distant server using TCP. The data were received from UART continously at the rate of 250 bytes/second and were then transmitted using TCP in packs of 240 bytes. At first, the data were sent by CP2201EB smoothly. However, intermittent data loss of 2-4 bytes per TCP pack was found during a continuous test of hours. I checked the memory in F340 and found the data loss originated from the intermittent loss from UART. The UART was driven by an interrupt! I made the UART interrupt high priority and the loss still happened. Is it possible that the UART interrupt is disabled during a TCP communication, and is there any method to solve the problem of data loss!
Please tell me how to transfer UART data over Ethernet.
I am using F340+CP2201EB , i am taking data from f850 uart . f850 UART (RX/TX) is connected to f340 UART (RX/TX) cross connection. This data taken from F850 to F340 should be tranmitted via Ethernet. Which inbuilt program to use. Or is there any other program to use????
Ethernet is a tricky protocol to use, so I recommend finding a stack to implement that side of things for you. CMX Micronet has one that supports the 'F34x, and you can contact them here for more information:
If you have another stack you want to use, we provide the low-level Ethernet routines for the 'F34x (attached) and 'F12x that you can use to add support to that stack for our devices.
slowing is not an option in your case (250B/s???). Look at the 34x example.
Is there some other processing in application? And yes, the long period 'interrupt disable ' can produce such effects!
This 240B takes >200us ENET INTR processing time, the 240B/s is >4ms/1B, therefore it's possible to have some sort of SYNCH issue.