Also functions called by ‘primary’ ISR code are still part of the ISR and are executed in ISR context. Only FreeRTOS functions with the FromISR ending can be used in ISRs because ISRs are special.
There are 3 major reasons avoiding printf and similar functions in ISRs.
They often require a lot of stack and usually the ISR stack isn’t that large
Some printf implementations might allocate memory from heap (using malloc) which is usually not allowed/possible in ISRs (depends on the heap implementation, but usually it isn’t)
printf and friends take a considerable amount of processing time and ISRs should as fast/short as possible. Also the low level output routine/driver called by printf might not be ISR safe.
Just so it isn’t lost in the comments about printf, the fact that the function is called from an ISR, means it should call xSemaphoreGiveFromISR, not xSemaphoreGive, which also means it really should be passed a pointer to the ‘Was Woken’ flag, so the ISR knows it should generate a yield at its end.
Depending on the processor, you might be able to issue the Yield from ISR inside the function or that might not be allowed.