'esp32 SemaphoreTake vs SemaphoreTakeFromISR

i want to have a task to calibrate xh711 on esp32. This task has to be triggered either buy button from iSR or by the program on initial start if needed.

On button press i have to user xSemaphoreGiveFromISR() but on automated call from program i can use xSemaphoreGive()

My question is which function should i use to identify the trigger? It is clear that for the button i have to use the xSemaphoreTakeFromISR() but on the automated trigger by the program should i use the xSemaphoreTake() or i can use the ISR version also with no problem?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source