FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [October 2016 Threads] How to control fall into SLEEP modePosted by mrazoun on October 25, 2016 Hi,
sorry for beginner's questions. How is it possible to control falling into SLEEP mode ?
When I'm using the peripheral (for example UART) which is not working in SLEEP mode I have to inform somehow FreeRTOS that the task need uP in RUN. Now I made it through proper setting of constant configEXPECTEDIDLETIMEBEFORESLEEP and parameter "xTicksToWait" in function ulTaskNotifyTake().
After that it depends on condition "if( xExpectedIdleTime >= configEXPECTEDIDLETIMEBEFORESLEEP )" (function portTASK_FUNCTION() in task.c) if uP goes into SLEEP or not.
Is it possible only by this way ?
My setup : EFM32GG (Cortex-M3), FreeRTOSLowPowerTickManagementBURTC.c, FreeRTOS V8.2.3, SLEEP = EM2
Thank's in advance.
Zdenek
How to control fall into SLEEP modePosted by rtel on October 25, 2016 In FreeRTOSLowPowerTickManagementBURTC.c you will see a function
called vPortSuppressTicksAndSleep() which handles the entry into and out
of sleep mode.
In that function you will see a call to SLEEP_Sleep() - which if I
recall correctly is a call into the SiLabs library, and the library
function should not put the MCU into a sleep mode that is too low for
the peripherals being used. So the first question is, did you use the
SiLabs library functions to initialise the UART? If so, why does the
sleep manager not know that it cannot go into a sleep mode lower than
the minimum the UART can use?
Just above there you will see a macro called
configPRESLEEPPROCESSING() being called. That allows you to insert
any code you want, and if the code the macro executes decides you should
not go into sleep mode then set its parameter (xModifiableIdleTime) to
zero and you will not go into sleep mode. Note this is a macro, not a
function, so in the macro's implementation you have to access the
xModifiableIdleTime variable directly.
How to control fall into SLEEP modePosted by mrazoun on October 26, 2016 Thank's for your very heplfull message. Now I understood this and I will modify my source code according to your explanation.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|