cancel
Showing results for 
Search instead for 
Did you mean: 

CMSIS OS2 Wrapper and Software Timers

roman1
Associate III

Dear ST,

 

the current version of the CMSIS OS2 wrapper (V1.8.0 for STM32WB) does not support calling the functions osTimerStart() and osTimerStop() from an ISR. However, FreeRTOS does provided the functions xTimerChangePeriodFromISR(), xTimerStopFromISR() that can be called from an ISR as an alternative to the functions xTimerChangePeriod(), xTimerStop() used in the wrapper.

 

Could you please support calling the mentioned functions from an ISR in a future release?

 

Best regards,

Roman

5 REPLIES 5
Nikita91
Lead II

CMSIS OS wrappers will never use all the features of all the RTOS.

I think that only the main APIs will be managed and many of the specificities that make the quality of an RTOS will be left out ...

Piranha
Chief II

ST is not the company which develops CMSIS specifications. Read the CMSIS-RTOS2 timer API documentation:

Timer management functions cannot be called from Interrupt Service Routines.

IMHO this one is a very bad design decision...

Pavel A.
Evangelist III

TL;DR Then use FreeRTOS API directly. Limitation of the CMSIS wrapper is too restrictive for you.

Even in FreeRTOS kernel calls are allowed not in any ISR. Not if interrupt priority is higher than configKERNEL_INTERRUPT_PRIORITY.

-- pa

Well, ST doesn't develop the CMSIS specifications, but I guess it's them that wrote the implementation. At least that's what the header in the CMSIS OS2 source files implies.

The website linked by you describes the reference imlementation with Keil RTX. Probably ST is allowed to create a better implementation with an RTOS that doesn't have this restrictions.

Anyway, I either will find a workaround or use FreeRTOS directly.

That's obvious.