Menu ▾ ▴

Interrupt on Receive

2018-02-01
2018-02-02
  • Abdullah Shafiq

    Abdullah Shafiq - 2018-02-01

    Hello,
    I am trying to make a application based on FNET+FreeRTOS. Is the flow below correct ?

            1. Create task for polling FNET services
            2. Create a task(socket_task) that contains :-
                       socket -> bind -> listen -> while(1){ 
                                                                                                    if(newsockfd = accept){Create new task(accept_task and pass                                 newsockfd )}  
           Is this a correct flow? also is there a API function that fets called whenever a accept request is recieved. I found out a function "fapp_socket_rx_callback" in example code. Does it get called whenever a ENET recieve occurs?
    
     
  • Andrej Butok

    Andrej Butok - 2018-02-01

    You are creating >3 tasks. Look at fnet freertos demo, which is using just one task for everything.

    Does it get called whenever a ENET recieve occurs?

    Yes.

     

    Last edit: Andrej Butok 2018-02-01
  • Abdullah Shafiq

    Abdullah Shafiq - 2018-02-01

    But it doesnt get called when I ping my Board

     

    Last edit: Abdullah Shafiq 2018-02-01
  • Andrej Butok

    Andrej Butok - 2018-02-01

    OK. It is called on UDP/TCP activity.
    When you are pinging your board, it is handled on ICMP level - this is not Socket layer.

     
  • Abdullah Shafiq

    Abdullah Shafiq - 2018-02-01

    Thank you so much :)

     
  • Abdullah Shafiq

    Abdullah Shafiq - 2018-02-02

    Hello,
    Yes I have made this code by understanding demo example. The reason for creating these tasks is that I want multiple tcp clients to connect. Sorry but I am unable to find the definition of fnet_socket_callback_on_rx. I want to understand the interrupt handling that you have done. in fnet_Socket :-
    /* Socket activity event handler.*/ static void (*fnet_socket_callback_on_rx)(void) ; fnet_event_desc_t fnet_socket_event_rx;
    Where is fnet_socket_callback_on_rx defined?

     

Log in to post a comment.