3

It depends on the architecture. Assuming AVR (8-bit Arduino) then it will queue the second interrupt until the first is finished. It works by setting a flag in a register at the moment the interrupt occurs. Then between instructions it checks that flag and executes the associated interrupt routine. If an interrupt is in progress at the time the flag still ...


2

The timer interrupt can even disrupt measurement of pulses using micros() from an on change interrupt. The timer interrupt takes around 6.5us on Arduino Uno or mega. If a change interrupt takes place just after the timer interrupt, then the change interrupt will be delayed by up to 6.5us until the timer interrupt completes. In addition, the microsecond ...


1

It depends on the specific MCU, not all are exactly the same. Some have interrupt priority circuitry that you can use. But in general, an ISR can be interrupted by another incoming IRQ, etc. What you often do in an ISR is mask IRQ, handle the IRQ, and then unmask to let any pending IRQs be handled. This is one reason why long-running ISRs should be avoided!...


1

You have enabled the timer and also its interrupts but you have no interrupt handler. The interrupt has to go somewhere and as it is it's going who-knows-where. Add an ISR and I believe that will resolve your issue. Yes, the capitalization is important!


1

I found the solution on another forum. You need to add the ICACHE_RAM_ATTR attribute to the interrupt so it stays in cache. void ICACHE_RAM_ATTR CLK_ISR() { ClkCount++; } Now: Freq is: 332596 - connected for 680s, operating at 160MHz That's all I tested to, but 330kHz is a bit better than crashing at 7kHz, lol! edit: I've discovered that it now crashes ...


1

Yes possible, but the ESP8266 only has one core and one set of peripherals. WiFi uses time, interrupts, and even the ADC peripheral, and maybe more. This is why anything timing-critical, or time-intensive, is a pain to get to work properly on an ESP8266. It depends one what you are trying to do, of course, and also on if you can unload what you want to a ...


Only top voted, non community-wiki answers of a minimum length are eligible