Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE
Hi,
To implement UDP communication between the controlCard board (TMDCNCD28388D) and my laptop, I created a new task in a separate thread on the board. Then I modified the “tcpHandler” and “tcpWorker” functions in the “tcpEchoF2838X” example as the following:
"tcpWorker" function:

"tcpHandler" function:


In this implementation, the controlCard board is set a the UDP server and my laptop as its UDP client. In the codes above, I first opened a UDP socket and assigned the server (our board) to this socket. Then, I implemented a loopback UDP communication using “recvfrom” and “sendto” functions.
To test the communication, I used the “Hercules” application to open a UDP port on my PC. When I run the example, however, the code gets stuck in the function “recvfrom” that is used in the “tcpWorker” function to receive data from the client on the UDP port. The picture below shows the details of functions’ traceback.

From my understanding, the “tcpHandler” is a callback function which is already used in the lower layers of NDK library’s source codes to implement TCP functionalities. Regarding this understanding, I thought that there should be a separate callback function for the UDP communication. However, I could not find any UDP callback functions in the source codes of the NDK library and its documentation. So, I modified the “tcpHandler” callback function to implement the UDP connection. I thought that it might be a source of error in our project. I wonder if you can guide me on what should I do to solve this problem.
Software sources and dependencies
In this project, I used the following sources to run the “tcpEchoF2838X” example”.
- “tcpEchoF2838X” example of F2838xD (version: C2000Ware_3_04_00_00)
- Network Development Kit (NDK) (version: 3_61_01_01)
- Network Services (NS) (version: 2_60_01_06)
- SYS/BIOS (version: 6_83_00_18)
- XDC tools (version: 3_61_02_27)