Skip to content

How to use sleep modes? #37

@eren-rudy

Description

@eren-rudy

I tried using the Arduino Low Power library to configure an interrupt by calling LowPower.sleep() in the idle task void loop(). I suppose it isn't surprising, given the warning "No rtos blocking functions allowed!" in the example code, that this was unsuccessful.

So, I went to the FreeRTOS documentation (Low power support) to learn more about using low power states. I looked in the FreeRTOSConfig.h file to see if configUSE_TICKLESS_IDLE was set, but didn't find it. I also searched all the source files for an implementation of portSUPPRESS_TICKS_AND_SLEEP() and couldn't find anything.

The RTOS documentation (found at the link above) provides a sample implementation of portSUPPRESS_TICKS_AND_SLEEP(), in the case that the port you are using doesn't provide it. However, I am not sure how I would implement a function such as prvStopTickInterruptTimer() (which is called in the sample implementation of portSUPPRESS_TICKS_AND_SLEEP() because as far as I can tell the timer used by the RTOS Kernel is not exposed the programmer. Apologies if I am missing something obvious, I am new to FreeRTOS. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions