Resum Task from ISR: CMSIS osThreadResume does not use xTaskResumeFromISR , how can that be solved?
Hello,
for acquiring Data I run a timer that does a I2CRead with DMA transfer and using a ISR for averaging
HAL_TIM_PeriodElapsedCallback -> HAL_I2C_Mem_Read_DMA
HAL_I2C_MemRxCpltCallback -> "Ava-Function"/Lowpassfilter
"AvgCnt ==16" -> "Schedule a Task"
After 16 Averages I'd like to schedule a task(resume a suspended task) to do further calculation. For that purpose I think a task would solve the issue by using xTaskResumeFromISR buth that is not used in the osThreadResume, it presents an error of called from an ISR.
osStatus_t osThreadResume (osThreadId_t thread_id) {
TaskHandle_t hTask = (TaskHandle_t)thread_id;
osStatus_t stat;
if (IS_IRQ()) {
stat = osErrorISR;
}
else if (hTask == NULL) {
stat = osErrorParameter;
}
else {
stat = osOK;
vTaskResume (hTask);
}
return (stat);
}
#endif /* (configUSE_OS2_THREAD_SUSPEND_RESUME == 1) */Why is that and how can that be resolved using the CMSIS abstraction-layer? Or did I miss something in the CMCIS?
Thanks a lot for the help.
Best regards, Seppel
