cancel
Showing results for 
Search instead for 
Did you mean: 

CubeMX: FreeRTOS USE_TICKLESS_IDLE

Aaron Pica
Associate III
Posted on February 01, 2017 at 16:15

In the last CubeMX version (4.19) the USE_TICKLESS_IDLE option is missing. This disables the configUSE_TICKLESS_IDLE flag and the low power configuration.

Is it a bug? Is any workaround available?

PS: I've checked the 4.17 version and it has this option available. I don't have the 4.18, so I can't check it.

#cubemx #freertos #cubemx-4.19
1 ACCEPTED SOLUTION

Accepted Solutions
FCR
Associate III
Posted on February 02, 2017 at 14:40

Hi,

It's a bug introduced with the support of FreeRTOS v9, to be fixed in the next version (sorry for that mistake).

As a temporary workaround (for 4.19), in the FREERTOS-v8.0.0_Cube_Modes.xml file (part of your CubeMx installation), you can modify the configUSE_TICKLESS_IDLE section (starting around line 814) as follows:

<RefParameter Name='configUSE_TICKLESS_IDLE' Comment='USE_TICKLESS_IDLE' DefaultValue='0' Type='list' Group='Kernel settings' TabName='Config parameters' Visible='true'>

<Condition Diagnostic='' Expression='(S_VERSION_8_2_1|S_VERSION_9_0_0) &amp; INCLUDE_vTaskSuspend=1'/>

<PossibleValue Comment='Disabled' Value='0'/>

<PossibleValue Comment='Enabled' Value='1'/>

<Description>By setting the configUSE_TICKLESS_IDLE, the idle task suppresses ticks and the processor stays in a low power mode for as long as possible.&lt;br&gt;

 When set to 1 (Enabled), two macros, configPRE_SLEEP_PROCESSING and configPOST_SLEEP_PROCESSING are generated in FreeRTOSConfig.h, and two empty functions, PreSleepProcessing and PostSleepProcessing generated in freertos.c (to be completed with user code).</Description>

</RefParameter>

<RefParameter Name='configUSE_TICKLESS_IDLE' Comment='USE_TICKLESS_IDLE' DefaultValue='0' Type='list' Group='Kernel settings' TabName='Config parameters' Visible='true'>

<Condition Diagnostic='Forced to 0 (Disabled) : cannot be enabled when INCLUDE_vTaskSuspend = 0 (Disabled)' Expression='(S_VERSION_8_2_1|S_VERSION_9_0_0) &amp; INCLUDE_vTaskSuspend=0'/>

<PossibleValue Comment='Disabled' Value='0'/>

<Description>By setting the configUSE_TICKLESS_IDLE, the idle task suppresses ticks and the processor stays in a low power mode for as long as possible.</Description>

</RefParameter>

<RefParameter Name='configUSE_TICKLESS_IDLE' Comment='configUSE_TICKLESS_IDLE' DefaultValue='0' Type='integer' Group='Kernel settings' TabName='Config parameters' Visible='false'>

<Description>By setting the configUSE_TICKLESS_IDLE, the idle task suppresses ticks and the processor stays in a low power mode for as long as possible.</Description>

</RefParameter>

Should solve the issue in 4.19 (the parameter is available in both versions, v8 and v9, of FreeRTOS).

As a reminder / for information, in CubeMx 4.19, FreeRTOS v9 is available on F3,F7,L0 series (porting on other series is on-going).

Regards

Fred

View solution in original post

7 REPLIES 7
Imen.D
ST Employee
Posted on February 01, 2017 at 17:52

Hi

Pica.Aaron

,

I will check this case and come back to you as soon as possible.

Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
stm32cube-t
Senior III
Posted on February 02, 2017 at 12:55

Dear User,

Please go the Config parameters tab.

In the Search field enter TICKLESS, you will be directly pointed to the USE_TICKLESS_IDLE parameter.

See attached snapshot.

________________

Attachments :

FreeRTOS_UseTickless.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hyxm&d=%2Fa%2F0X0000000bET%2Faw2LTXhjjnIzs.32Xbwp82T55vKoaNxkMo3r9e98Bfc&asPdf=false
Posted on February 02, 2017 at 13:08

Hi

Mondoloni.Pascal

,

I'm sorry, but this is not true in the last version (4.19).

0690X00000606ChQAI.png

Are you using the last CubeMx version?

0690X00000606DKQAY.png

Thank you

FCR
Associate III
Posted on February 02, 2017 at 14:40

Hi,

It's a bug introduced with the support of FreeRTOS v9, to be fixed in the next version (sorry for that mistake).

As a temporary workaround (for 4.19), in the FREERTOS-v8.0.0_Cube_Modes.xml file (part of your CubeMx installation), you can modify the configUSE_TICKLESS_IDLE section (starting around line 814) as follows:

<RefParameter Name='configUSE_TICKLESS_IDLE' Comment='USE_TICKLESS_IDLE' DefaultValue='0' Type='list' Group='Kernel settings' TabName='Config parameters' Visible='true'>

<Condition Diagnostic='' Expression='(S_VERSION_8_2_1|S_VERSION_9_0_0) &amp; INCLUDE_vTaskSuspend=1'/>

<PossibleValue Comment='Disabled' Value='0'/>

<PossibleValue Comment='Enabled' Value='1'/>

<Description>By setting the configUSE_TICKLESS_IDLE, the idle task suppresses ticks and the processor stays in a low power mode for as long as possible.&lt;br&gt;

 When set to 1 (Enabled), two macros, configPRE_SLEEP_PROCESSING and configPOST_SLEEP_PROCESSING are generated in FreeRTOSConfig.h, and two empty functions, PreSleepProcessing and PostSleepProcessing generated in freertos.c (to be completed with user code).</Description>

</RefParameter>

<RefParameter Name='configUSE_TICKLESS_IDLE' Comment='USE_TICKLESS_IDLE' DefaultValue='0' Type='list' Group='Kernel settings' TabName='Config parameters' Visible='true'>

<Condition Diagnostic='Forced to 0 (Disabled) : cannot be enabled when INCLUDE_vTaskSuspend = 0 (Disabled)' Expression='(S_VERSION_8_2_1|S_VERSION_9_0_0) &amp; INCLUDE_vTaskSuspend=0'/>

<PossibleValue Comment='Disabled' Value='0'/>

<Description>By setting the configUSE_TICKLESS_IDLE, the idle task suppresses ticks and the processor stays in a low power mode for as long as possible.</Description>

</RefParameter>

<RefParameter Name='configUSE_TICKLESS_IDLE' Comment='configUSE_TICKLESS_IDLE' DefaultValue='0' Type='integer' Group='Kernel settings' TabName='Config parameters' Visible='false'>

<Description>By setting the configUSE_TICKLESS_IDLE, the idle task suppresses ticks and the processor stays in a low power mode for as long as possible.</Description>

</RefParameter>

Should solve the issue in 4.19 (the parameter is available in both versions, v8 and v9, of FreeRTOS).

As a reminder / for information, in CubeMx 4.19, FreeRTOS v9 is available on F3,F7,L0 series (porting on other series is on-going).

Regards

Fred
Posted on February 02, 2017 at 13:57

Hi pica.aaron,

This is depends on FreeRTOS version and not CubeMx version:

USE_TICKLESS_IDLE flag is

available with FreeRTOS version 8.2.3, but not in FreeRTOS 9.0.0

0690X000006069sQAA.png0690X00000606FLQAY.png
When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Aaron Pica
Associate III
Posted on February 02, 2017 at 15:15

Thank you

CRAISSON.FREDERIC

‌. I've edited the file (located on ...\STMicroelectronics\STM32Cube\STM32CubeMX\db\mcu\IP\

FREERTOS-v8.0.0_Cube_Modes.xml) as you explain and it worked well. I'm using a STM32F7 MCU.

DAHMEN.IMEN

‌, please ensure of the reply before posting. Any misinterpretation can lead to big repercussions.

Posted on February 02, 2017 at 18:26

Thank you

CRAISSON.FREDERIC

for your prompt answer/confirmation.

Pica.Aaron

, s

orry for thismisunderstanding. what I meant to say isthatthe bug

just appears withthe

version of

FreeRTOS v9.

Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen