My company sold a number of weather stations based on Electron 2G/3G on 2017, they are based on 0.6.4 and have hardwired the D7 Input to a wind speed sensor (hence the need for an interrupt to calculate the speed based on the time between pulses). They all work well and the D7 interrupt works without issues.
I am testing a firmware upgrade that redirects the data to another server, and we would like to take advantage of many improvements since that OS version, specially the Device Vitals features.
During testing I discovered that interrupts were disabled for D7 via this line in the definition of attachinterrupt() in spark_wiring_interrupts.cpp#L92, #L76
if (pin == D7) return false;
I commented out this line and compiled locally and the interrupts worked again, I checked and this was modified in the source even for 0.6.4. So I’m afraid if we upgrade the OS the D7 pin will no longer acquire the wind speed correctly because it will not allow attaching the interrupt.
Correct me if I’m wrong, but unless we use a custom OS that allows the interrupt on D7, we can’t do any OS upgrade to our devices. And would that mean losing OTA upgrades?
It seems to me disabling all interrupts on D7 just because it’s shared with the BATT_INT_PC13 interrupt was a bad call. This would never be a problem for our product because the device’s battery is not removable while the wind speed sensor is connected.
If you want I can share the code, but I think this explanation is enough, thanks for your interest!