diff --git a/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro.ino b/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro.ino index 16dd8db3e..c93c1a077 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_88_esp32_shelly_pro.ino @@ -272,6 +272,10 @@ void ShellyProUpdateIsr(void) { /* The goal if this function is to minimize SPI and SetVirtualPinState calls */ + noInterrupts(); + detachInterrupt(SPro.pin_mcp23s17_int); + interrupts(); + uint32_t input_state = SP4Mcp23S17Read16(SP4_MCP23S17_INTCAPA); // Read intcap and clear interrupt input_state &= 0x806F; // Only test input bits @@ -298,6 +302,8 @@ void ShellyProUpdateIsr(void) { mask <<= 1; } SPro.input_state = input_state; + + attachInterrupt(SPro.pin_mcp23s17_int, ShellyProUpdateIsr, CHANGE); } bool ShellyProButton(void) { diff --git a/tasmota/tasmota_xnrg_energy/xnrg_07_ade7953.ino b/tasmota/tasmota_xnrg_energy/xnrg_07_ade7953.ino index 8f5fb7237..935a5a7f0 100644 --- a/tasmota/tasmota_xnrg_energy/xnrg_07_ade7953.ino +++ b/tasmota/tasmota_xnrg_energy/xnrg_07_ade7953.ino @@ -836,6 +836,7 @@ bool Xnrg07(uint32_t function) { bool result = false; switch (function) { +/* case FUNC_ENERGY_EVERY_SECOND: // Use energy interrupt timer (fails on SPI) if (!Ade7953.use_spi) { // No SPI Ade7953EnergyEverySecond(); @@ -846,6 +847,11 @@ bool Xnrg07(uint32_t function) { Ade7953EnergyEverySecond(); } break; +*/ + case FUNC_ENERGY_EVERY_SECOND: // Use energy interrupt timer (fails on SPI) + Ade7953EnergyEverySecond(); + break; + case FUNC_COMMAND: result = Ade7953Command(); break;