Hello everyone, I have some confusion regarding the process flow of program at the driver level.
I have the following debug logs from at86rf2xx (with some custom logs)
CLIENT - m3-100;[at86rf2xx] at86rf2xx_tx_load
CLIENT - m3-100;[at86rf2xx] PRELOADED at86rf2xx_tx_exec
CLIENT - m3-100;PKT SENT // Represents end of _send method in at86rf2xx_netdev.c
server - m3-101;INTERRUPT
server - m3-101;[at86rf2xx] EVT - ISR CALLED
CLIENT - m3-100;INTERRUPT // Represents _irq_handler method in at86rf2xx_netdev.c if (dev->event_callback) this is TRUE/1
CLIENT - m3-100;[at86rf2xx] EVT - ISR CALLED // represents _isr method being called
CLIENT - m3-100;[at86rf2xx] return to idle state 0x16
server - m3-101;[at86rf2xx] EVT - RX_END
server - m3-101;PKT RECV
server - m3-101;PKT RECV
CLIENT - m3-100;[at86rf2xx] EVT - TX_END
My question here is that,
Firstly, does PKT_SENT i.e. the end of send method from netdev::send mean that data/packet was actually sent?
Secondly, if the answer is yes to previous question, why does INTERRUPT occur after the packet was sent? If answer to the first question is no, then when/where does the packet/data actually gets transmitted?
I am aware that methods such as prepare/load/exec already start the transmission process, hence the dilemma about INTERRUPT being called after these modules/functions.
Thirdly, In the logs (not present in the above log), I observed that the following piece of code never gets executed even though packet transmission starts
if (netdev->event_callback &&
(dev->flags & AT86RF2XX_OPT_TELL_TX_START)) {
DEBUG(“TX STARTED\n”);
netdev->event_callback(netdev, NETDEV_EVENT_TX_STARTED);
}
I really appreciate any help in solving this small confusion. Thank you.