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.
The environment parameter is as below,
FSP v3.5.0
FreeRTOS v10.4.3-LTS.Patch.2+fsp.3.5.0
Hi Cooper,
While looking for information, I found this app note and in chapter 3.2, it say there that "The LPMapplications do not use RTOS". I'm not sure about it. I hope someone from the RA team can confirm this one.
JBIf this response, or one provided by another user, answers your question, please verify the answer. Thank you!Renesas Engineering Community Moderatorhttps://community.renesas.com/https://academy.renesas.com/https://en-support.renesas.com/knowledgeBase/
Hi,
Currently the tickless idle support in the FSP FreeRTOS port uses the sleep low power mode. This mode is more suited to this purpose as the systick timer keeps running so FreeRTOS can wake up the CPU when a timeout occurs or simple keep time.
If it is acceptable for the RTOS to lose track of time or ignore timeouts then software standby could be used. In this mode the systick timer stops. You will of course need to enable a wake up source to exit software standby mode.
Ian.
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