I'am doing a quite simple project with ESP32 and can't handle some problem:
I have ISR handler:
Code: Select all
static void IRAM_ATTR gpio_isr_handler(void *arg)
{
timer_get_counter_value(0, 0, &itr_time); /* fot count time */
BaseType_t xReturn = pdFALSE;
xSemaphoreGiveFromISR(xGPIOMutex, &xReturn);
if (xReturn == pdTRUE)
{
portYIELD_FROM_ISR();
}
}
Code: Select all
void gpio_task(void *arg)
{
TCA9535_Register last_data = {};
while (1)
{
xSemaphoreTake(xGPIOMutex, portMAX_DELAY);
{
timer_get_counter_value(0,0, &task_time);
TCA9535ReadInput(&inputRegister);
}
}
This is how I create gpio_task (24 the highest priority in this project):
Code: Select all
xTaskCreate(&gpio_task, "gpio_task", 4096, NULL, 24, NULL);
And sorry for my eng