Hello Joakim, thanks again for answering the questions. I am sorry, I have couple of more questions.
Firstly, I do not set the NETOPT_TX_START_IRQ flag. There is no need to tell the threads or mcu that transmission is starting in all cases?
This is also signaled to the upper layers via the netdev->event_callback(netdev, NETDEV_EVENT_TX_STARTED); call in at86rf2xx_tx_exec (at86rf2xx.c). When the transmission is finished, the transceiver will issue an IRQ to the CPU and the CPU will run the IRQ handler.
No Interrupt required to start transmission? (I was assuming so because, from what you described in the earlier messages, INTRRUPT flips the GPIO pin which informs the CPU about an event to read from some register, after which the transmission would start, but I can clearly see that all the bus requests and calls happen in exec()/prepare() and load() methods. This is what created the confusion about the need for INTERRUTP. But then, if I disable the Interrupt, I do not receive packet I am able to send only).
Basically, still confused about the role of Interrupt/ISR for sending a packet. It may be pretty straightforward but please help me out. And I think it would be awesome if sending process is also added to "netdev.h" documentation just like receiving process.
The end of the _send method (in at86rf2xx_netdev.c) means that the frame has been loaded in the transceiver buffer and the transceiver is going to send it at the next opportunity.
Actually, the thing is I am experiencing some jitter post at86rf2xx::exec() method. I am trying pin point the cause but since I am not able locate a point which could actually be causing jitters. Is there a way to timestamp the wait process (after frame is loaded) until the frame transmission starts.
And, is there any file where I am forgetting to enable debugging to get the exact process flow. I am already debugging gnrc_netif, gnrc_netif_ieee802154, at86rf2xx/*, and gnrc_mac/internal.c.
Finally, I was expecting similar method definitions in other radio drivers as well. But, for cc2420_netdev, the _isr function only has RX_COMPLETE event. I would like to know why are the other events missing and how do the upper layers, in this case, become aware of the events.
I know these are lot of question but, I hope these question would give me all the answers I need. Thank you.
Regards, Navneet Pandey