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.

AM437x IDK TCP/IP transmission

Hi,

I use idkam437x with ccs 6.1.2, sysbios 6.45.1.29, sdk 2.1.1.2 and ndk 2.24.3.35.

I would like to process two kinds of tcp/ip packets: one with high priority for synchronization and as an indicator of transmission start, and the second with my measurements data.

My idea was to receive the first (synchronizing) packet in the hardware interrupt mode by the callback pointer:

((((ICSS_EmacObject*)icssEmacHandle->object)->callBackHandle)->rxRTCallBack)->callBack = (ICSS_EmacCallBack)MyProcessFuntion;

When getting the first packet, the appropriate socket will be created in the respective function or task (unfortunately for me, the task seems to be crucial) until all the data is received. In the end, the socket will be closed and the system will wait for another synchronizing  packet.

Does it all seem reasonable and workable for you? The above atypical way was proposed because of a few reasons:

- I do not write network-focused application - in my case the medium will be used interchangeably with UART for occasional measurement data transfer. The main thread is really demanding so I cannot set an infinite task for network scanning (like daemon) as it requires a lot of computing power. That is why I proposed the first packet to synchronize the action of socket creation and data receiving - when I am absolutely sure the data is on line.

- As I know, high priority packets are processed by the callback function and at this stage no socket is required? It should be ready for another, ordinary packet but what if it comes before socket creation? Do I loose it or is it put on stack and can be collected after socket creation?

- The use of DaemonNew() in net hooks looks tempting, however the content of it seems encumbering in my case. Plenty of actions need to be done every loop and it looks to be ideal for network-focused applications.

Please advise me on the above things as I have no experience in ethernet applications.

Thank you!

JJ

  • The RTOS team has been notified. They will respond here.
  • Hi JJ

      >>to receive the first (synchronizing) packet in the hardware interrupt mode by the callback pointer. When getting the first packet, the appropriate socket will be created in the respective function or task (unfortunately for me, the task seems to be crucial) until all the data is received. In the end, the socket will be closed and the system will wait for another synchronizing  packet. Does it all seem reasonable and workable for you?

    The design looks fine provided the first synchronization packet is pre-defined, i.e. not a packet being segmented, otherwise, the packet re-assembly will be broken in the following socket function. 

    >> As I know, high priority packets are processed by the callback function and at this stage no socket is required? It should be ready for another, ordinary packet but what if it comes before socket creation? Do I loose it or is it put on stack and can be collected after socket creation?

    Yes, there is no socket required for the callback function and can directly use the low level API ICSS_EmacRxPktGet() to receive packets. The ordinary packet will be dropped if the socket is not created and the packet Rx queue is full. There are four queues internally and each can hold max 4 1518-byte packets by default.

     

    David