[riot-users] Radio Interrupt Handler

Joakim Nohlgård joakim.nohlgard at eistec.se
Wed Nov 7 11:57:23 CET 2018


Hi Navneet Pandey,

Den mån 5 nov. 2018 18:11 skrev Navneet Pandey <navneet.pandey at outlook.in>:

> Hello,
>
>
>
> Could someone please point out the code where radio is switched on/off
> when sending a MAC/UDP packet.
>

It is not switched off unless you are using a duty cycling MAC layer such
as lwmac or ContikiMAC [1]

>
>
> I am expecting something similar to the following code snippet:
>
> /** Turn the MAC layer on. */
>
>   int (* on)(void);
>
>
>
>   /** Turn the MAC layer off. */
>
>   int (* off)(int keep_radio_on);
>
>
>
> This code is from Contiki.
>

The equivalent call for switching the radio to sleep mode like the contiki
on/off calls would be netdev_driver::set [2] with opt=NETOPT_STATE and
*value=NETOPT_STATE_SLEEP or NETOPT_STATE_IDLE. Take a look at what happens
in the ifconfig shell command when you call it with ifconfig x set state
sleep [3]

>
>
> I am interested in understanding the time it takes for system to wake up
> from sleep (dormant mode) to receive packets.
>
>
>
I am actually working on some similar performance measurements for a
project as well. I will need to measure some various timings related to CPU
low power modes and ContikiMAC. Right now I don't have anything to show,
but I can post back when I have some test program. The testing setup will
consist of a logic analyzer and using some gpio pins for status.

Best regards,
Joakim

References:
[1]: https://github.com/RIOT-OS/RIOT/pull/9478
[2]:
http://api.riot-os.org/structnetdev__driver.html#ad5c8c409276a702877ad50ad09e87a58
[3]:
https://github.com/RIOT-OS/RIOT/blob/master/sys/shell/commands/sc_gnrc_netif.c#L826

> Thank you.
>
>
>
> Regards,
>
> Navneet Pandey
>
>
> _______________________________________________
> users mailing list
> users at riot-os.org
> https://lists.riot-os.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/users/attachments/20181107/21a85716/attachment.html>


More information about the users mailing list