how are you?. I'm creating a project where I use a ESP32 with its isr attached to a physical pin, in the code I use the pin as follows:
the pin number is declared as follows:
struct valvulaSensor
{
uint8_t valvula;
uint8_t lecturaFlujo;
uint8_t estadoValvula;
uint32_t pFinal;
uint32_t cPulsos; // Variable para contar los pulsos del sensor de flujo.
// NOTA: se usará como sensor de flujo uno de los PWM
// del ESP32, cuando se implemente en físico si se usará
// la entrada del sensor de flujo real.
};
valvulaSensor control = {32, 33, VAL_CERRADA, 0};
Where valvula is a pin that I must activate and lecturaFlujo is a pin where I need to count pulses.
the pin is declared as input in the setup routine as follows:
pinMode(control.lecturaFlujo, INPUT);
after that, in a function that I call later in the loop() routine the interrupt is activated as follows
attachInterrupt(control.lecturaFlujo, rpm, RISING);
where "rpm" function only counts pulses.
well, then the program runs in the simulator and in the physical device but the serial monitor gives me an error on the isr which says
E (35868) gpio: gpio_isr_handler_remove(480): GPIO isr service is not installed, call gpio_install_isr_service() first
How can I solve this problem?.
Thanks in advance for the help.