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.

TMS320F28388D: UDP communication using NDK library

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)
  • Hi,

    We haven't tested any UDP based application on f28388 using NDK.

    We are looking into this and will get back to you.

    Regards,

    Yashwant

  • Hi Yashwant,

    Thank you for your reply. 

    1- This inquiry is very urgent on my side. Do you have any particular time frame in mind for your UDP tests using NDK?

    2- I am using NDK (version: 3_61_01_01) which internally (seemingly) uses many other compiled libs/dlls that we don't have access to. Can you provide the source code of NDK so we can also look into it?

    Regards,

    A.

  • I presume you are using run time object view to view the status print messages and RTOS tasks status, mode.  And also you are referring the following documents ndk_f2838x_3_61_01_01/docs/ndk/NDK_Driver_Design_Guide.pdf, SPRU524 for api reference.

    Unfortunately there are no plans to develop UDP example based on NDK for TMDCNCD28388D.

    -Yashwant