Skip to main content
flavio23
Associate II
March 14, 2021
Solved

Functions missing in FreeRTOS CMSIS v2 using STM32CubeIDE

  • March 14, 2021
  • 6 replies
  • 4101 views

I'm trying to use these two functions in STM32CubeIDE within FreeRTOS CMSIS v2:

  • osKernelSuspend()
  • osKernelResume()

My goal is to put the microcontroller in STOP MODE.

I get an error when compiling the project.

The problem seems to be the following: the two functions are only defined in cmsis_os2.h, but they are missing in cmsis_os2.c.

Such functions are well described in the documentation:

https://www.keil.com/pack/doc/CMSIS/RTOS2/html/group__CMSIS__RTOS__KernelCtrl.html#gae26683e1606ec633354a2876c68f0c1f

But they are missing in the FreeRTOS folder.

I'm using STM32L4xx microcontroller

Any suggestion to fix the problem?

Thanks in advance!

Flavio

This topic has been closed for replies.
Best answer by Walid ZRELLI

Hello @flavio23​ ,

Unfortunately, osKernelSuspend and osKernelResume are not supported.

The limitations of CMSIS-FREERTOS are described in the following reference:

https://arm-software.github.io/CMSIS-FreeRTOS/General/html/tech_data.html

BeST Regards,

Walid

6 replies

Technical Moderator
March 16, 2021

Hello @flavio23​ ,

I added the right topic "STM32CubeIDE" to your question in order to increase its chance to be reviewed by our STM32CubeIDE experts @Markus GIRDLAND​ .

Which CubeIDE version are you using ?

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".Thanks Imen
Markus GIRDLAND
ST Employee
March 17, 2021

Hello flavio!

I'm taking a look at this and will get back to you as soon as I can.

flavio23
flavio23Author
Associate II
March 17, 2021

Thank you so much,

I'm using the STM32CubeIDE version 1.6.0.

Flavio

Walid ZRELLI
Visitor II
May 24, 2021

Hello @flavio23​ 

In the CubeL4 v1.17.0 both APIs are implemented, but could you check that the flag configUSE_OS2_THREAD_SUSPEND_RESUME is defined in FreeRTOSConfig.h file ?

Best Regards,

walid

BParh.1
Senior III
May 24, 2021

Probably need to check on STM32CubeMX tool under Middleware->FreeRTOS. Make sure the suspend and resume are enabled

Walid ZRELLI
Visitor II
May 24, 2021

Hello @flavio23​ ,

Unfortunately, osKernelSuspend and osKernelResume are not supported.

The limitations of CMSIS-FREERTOS are described in the following reference:

https://arm-software.github.io/CMSIS-FreeRTOS/General/html/tech_data.html

BeST Regards,

Walid

mwb
Associate III
December 15, 2022

Your link yields a 404 error.

The following worked for me: https://arm-software.github.io/CMSIS-FreeRTOS/latest/tech_data.html