- Tue Apr 21, 2015 10:48 am
#15202
Hey anakod,
so I tried the following:
Code: Select all#include <user_config.h>
#include <SmingCore/SmingCore.h>
//#include "myInterrupts.h"
#define IR_PIN 12 // GPIO12
void IRAM_ATTR inter_call()
{
//interruptMode(IR_PIN, 99); // Disable interupts
Serial.println("Interupting...");
}
void init()
{
Serial.begin(SERIAL_BAUD_RATE); // 115200 by default
Serial.println("Setting up...");
attachInterrupt(IR_PIN, inter_call, RISING);
interrupts();
Serial.println("Ready...");
}
and it still failed.
I then went on to hack your interrupt code, mainly changing your InterruptHandler.
Code: Select allstatic void IRAM_ATTR interruptHandler(void *arg)
{
gpio_pin_intr_state_set(GPIO_ID_PIN(interrupt_pin), GPIO_PIN_INTR_DISABLE);
GPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, BIT(interrupt_pin));
tempCallback();
}
and it worked perfectly.
Am I missing something?
I will experiment a bit more when I get a chance but the issue seems to be with this line
Code: Select allGPIO_REG_WRITE(GPIO_STATUS_W1TC_ADDRESS, gpio_status & BIT(i));
It just gets stuck there.
I can move on using my altered interrupt code but would also like to help you solve this bug if it is indeed one.