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.

RTOS/AM4378: Ethernet interrupt

Part Number: AM4378


Tool/software: TI-RTOS

Hello.

I am using SKAM437x and I have compiled "NIMU_BasicExample_skAM437x_armExampleproject" project. The project works correctly, and I can do a ping and see the reply from the SK in my laptop.

Now, with this example project, how could I generate an interrupt when the SK receive a packet through ethernet connection in an specific port?

Is there any other example to do something like that?

Thankyou.

Regards.

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

    The AM437x CPSW is not able to provide separate interrupts for receiving data on different ports.
    As described in the AM437x AM437x Sitara Processors Technical Reference Manual at www.ti.com/.../technicaldocuments
    - the CPSW core provides 4 interrupts outputs to the ARM
    These are the RX_THRESH (3PGSWRXTHR0) – Receive Threshold interrupt (nonpaced)
    RX (3PGSWRXINT0) – Receive interrupt (paced)
    TX (3PGSWTXINT0) – Transmit interrupt (paced)
    Misc (3PGSWMISC0) – Other interrupts

    David
  • Hi.

    Thanks for the answer.

    The idea is to respond to a message sent on specific tcp/ip port. So I could generate an interrupt for every tcp/ip packet, analize the port and generate the answer accordingly.

    It is possible to do that wiht NDK library? 
    Is there any way to generate a high level interrupt with the NDK packet instead of using the low level interrupt when a tcp/ip packet arrives?

    Regards.

  • Hi Dionisio

    There is an example to implement this operation although the example still relies upon the low level interrupts.

    PDK_1_0_5 uses ndk_2_25_00_09 .

    The NDK user Guide is contained the document directory C:\ti\ndk_2_25_00_09\docs.
    In section 3.3 on page 59 there is a TCPIP echo sockets example. This code creates a socket, connects to port 7, sends some data, and then tries to receive it back.

    Let me know if this will work for you.

    David
  • Hi.

    Thanks for your comments.

    I have used the function 

    hEcho = DaemonNew( SOCK_STREAMNC, 0, 7, dtask_tcp_echo, OS_TASKPRINORM, OS_TASKSTKNORM, 0, 3 );

    This function works fine for me. Still I have some doubts. With this function dtask_tcp_echo function is called when a packet is received at port 7, but this call is made by pooling or by interrupt?

    I want to design a system that receives packets in 4 different ports. Packets can be received a high speed at all the ports. Could I manage all the data creating 4 functions with DaemonNew? 
    Could handle data received at gb speed?

    Thanks.

    Regards.