Hello,
This functions can't be used in an ISR, you need to use the functions xSemaphoreGiveFromISR to release the semaphore, also I will suggest to not use lock functions in an ISR since the IRQ needs to be the shortest possible.
The usual approach is to use a semaphore/mutex take in the task to lock a peripheral or coordinate the tasks and use the give in the ISR to release the peripheral.
Best Regards,
Alexis Andalon