Skip to main content
roman1
Associate II
August 3, 2020
Question

CMSIS OS2 Wrapper and Software Timers

  • August 3, 2020
  • 3 replies
  • 2892 views

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

This topic has been closed for replies.

3 replies

Nikita91
Lead II
August 5, 2020

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
Principal III
August 6, 2020

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...

roman1
roman1Author
Associate II
August 7, 2020

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.

Pavel A.
Super User
August 6, 2020

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

roman1
roman1Author
Associate II
August 7, 2020

That's obvious.