2020-08-03 05:03 AM - last edited on 2023-11-30 07:14 AM by Amel NASRI
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
2020-08-05 09:17 AM
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 ...
2020-08-06 10:06 AM
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...
2020-08-06 11:32 AM
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
2020-08-07 12:08 AM
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.
2020-08-07 12:11 AM
That's obvious.