FreeRTOS LPM

Hello,

I'm implementing FreeRTOS in RA6T2 for the project, and now I have a question about the low power mode,

according the rm_freertos_port_sleep_preserving_lpm (uint32_t xExpectedIdleTime) in rm_freertos_pot/port.c

/** Check if the LPM peripheral is set to go to Software Standby mode with WFI instruction.
* If so, change the LPM peripheral to go to Sleep mode. */

if (R_SYSTEM_SBYCR_SSBY_Msk & saved_sbycr)
{
/* Save register protect value */
uint32_t saved_prcr = R_SYSTEM->PRCR;

/* Unlock LPM peripheral registers */
R_SYSTEM->PRCR = RM_FREERTOS_PORT_UNLOCK_LPM_REGISTER_ACCESS;

/* Clear to set to sleep low power mode (not standby or deep standby) */
R_SYSTEM->SBYCR = 0U;

/* Restore register lock */
R_SYSTEM->PRCR = (uint16_t) (RM_FREERTOS_PORT_LOCK_LPM_REGISTER_ACCESS | saved_prcr);
}

I'm wondering if the sleep mode is the one and only LPM can be used in FreeRTOS?

Can I enter Software Standby mode in the project using FreeRTOS?

Thanks.

Top Replies

Parents Reply
  • Thanks JB.

    After reading the reference you provided, I think "The LPM applications do not use RTOS"  means that the example project which the document introducing does not include RTOS, but I think the RTOS and LPM can coexist in any project, but I'm not sure about it either.

    Thanks for your reply.

    Cooper

Children
No Data