This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CMSIS_v2 osKernel..() not defined

Hello all!
I have a problem with CMSIS_v2.

I'm trying to implement a program for the STM32F446RE Nucleo board, where it goes to sleep mode, when there is nothing to do, and wakes up when an UART transmission comes and generates interrupt.

I'm using Stm32Cube for creating the skeleton code, intializing, etc. I enabled FreeRTOS CMSIS_v2 in it, and generate Keil uVision5 code.

Unfortunately, after calling _WFI, the controller instantly wakes up. I do disable SysTick before going to sleep, so I assume there is another timer in the OS that wakes it up, but I couldn't find out which is it and how to disable it. 

In the CMSIS_v2 documentation I came across a function called osKernelSuspen(). Maybe it is the solution, but I can't use it, because after building the code, I got an error that that function is not defined. But it is in the cmsis_os2.h file, and I changed the #include cmsis_os.h to cmsis2.h.

I have been trying for two days, and getting desperate. 

I have tried to enable FreeRTOS under RTOS2(API) in Manage Run-Time Environment, under CMSIS option, but then the building failed with an error in Heap_Stats. Now only the Core is enabled under the CMSIS option.

Tbh I'm a little bit confused about what should I add or shouldn't, so I use the default settings, and so far I had no problem with it, until now. I have tried Atollic, maybe I have a little bit of luck, but no, the whole IDE was a mess for me.

Any help with the include and/or the sleep mode implementation in CMSIS_v2 is highly appreciated.

Thanks in advance, Norbi

0