Can taskENTER_CRITICAL_FROM_ISR() be used outside ISR?

Hi, Can I use taskENTERCRITICALFROM_ISR() in function that is NOT called from ISR? Will critical section work properly (preemption protection) in this case? Best Regards Lukasz

Can taskENTER_CRITICAL_FROM_ISR() be used outside ISR?

Which port are you using?

Can taskENTER_CRITICAL_FROM_ISR() be used outside ISR?

FreeRTOSv9.0.0FreeRTOSSourceportableGCCARM_CM4F

Can taskENTER_CRITICAL_FROM_ISR() be used outside ISR?

For that port the answer is ‘yes’ you can use the macros outside an ISR. Note the macro returns the current interrupt status, and the value returned must then be passed into a matching call to taskEXITCRITICALFROM_ISR().