再中断中失能中断,线程中开启中断。中断不响应问题

lixing3204
Posts: 2
Joined: Thu Jan 03, 2019 9:20 am

再中断中失能中断,线程中开启中断。中断不响应问题

Postby lixing3204 » Fri Jun 21, 2019 10:40 am

static void IRAM_ATTR gpio_isr_handle(void* arg)
{
uint32_t gpio_num = (uint32_t)arg;
xQueueSendFromISR(gpio_pen_queue,&gpio_num,NULL);
GPIO.pin[GPIO_PEN_SDA_IO].int_ena = 0; ///关闭中断
}
static void gpio_task_example(void* arg)
{
uint32_t io_num;
for(;;) {
if(xQueueReceive(gpio_pen_queue, &io_num, portMAX_DELAY)) {
printf("GPIO[%d] intr, val: %d\n", io_num, gpio_get_level(io_num));
// GPIO.status_w1tc=1<<GPIO_PEN_SDA_IO;
// GPIO.pin[GPIO_PEN_SDA_IO].int_type = GPIO_INTR_NEGEDGE;
// GPIO.pin[GPIO_PEN_SDA_IO].int_ena = 1; ///开启中断
gpio_set_intr_type(GPIO_PEN_SDA_IO, GPIO_INTR_NEGEDGE);
gpio_intr_enable(GPIO_PEN_SDA_IO);
}
}
}

ESP_houwenxiang
Posts: 118
Joined: Tue Jun 26, 2018 3:09 am

Re: 再中断中失能中断,线程中开启中断。中断不响应问题

Postby ESP_houwenxiang » Thu Aug 08, 2019 4:00 am

请查看一下这里的回复 viewtopic.php?f=25&t=11123, 相同的问题.
wookooho

Who is online

Users browsing this forum: No registered users and 134 guests