Tickless question

delphes wrote on Tuesday, March 06, 2018:

Dear All,

FreeRtos Tickless is a very good feature, in my case most of the time my CPU is waiting events in infinite time sometimes a button will exit from sleeping and start mulitple things where tickless should be disable during that time, so the only idea I found is to set a flag when I do not want tickless and test this flag when entrance in vPortSuppressTicksAndSleep, as soon as the long process (unsleeped) is done I reset the flag. Is this a good way to achieve this or more elegant way is existing ?

regards
David

rtel wrote on Tuesday, March 06, 2018:

Could you use the configPRE_SUPPRESS_TICKS_AND_SLEEP_PROCESSING() macro
for this? If you set its parameter (note this is a macro, not a
function, so the parameter is actually an inline variable) to 0 when you
don’t want to sleep going into sleep mode will be aborted. You can see
this on line 3320 (at the time of writing) here:
https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/tasks.c

delphes wrote on Tuesday, March 06, 2018:

Dear Richard,

It will be great but in my version 9.0.0 I do not have it. need to check why ?

Thanks