Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By 123francoz
#45109 This is the sketch i made in Arduino 1.6.8 IDE with ESP8266 ver 2.1.0 package installed and everything left default:
Code: Select all#define led 2

void setup() {
  noInterrupts();
  pinMode(led, OUTPUT);
}

void loop() {
  while (true) {
    digitalWrite(led, LOW);
    digitalWrite(led, HIGH);
  }
}

It gives me a 1.1MHz squre wave at GPIO2 with a frequency drop at about half the frequency every almost 3 seconds
User avatar
By martinayotte
#45110 Of course, the WiFi background tasks are still partially running, even if you call noInterrupt(), simply because the NMI interrupt is still active (this one cannot be blocked).

But why are you trying to block interrupts ? Because in this case, even if WiFi tasks partially running, you won't get a working WiFi.

If it is simply to have a stable waveform, maybe you should attach a separate MCU to do that, such AVR, or even STM32.
User avatar
By 123francoz
#45125 There is not a specific reason because i'm doing that.
I only wanted to see how the firmware has been implemented
and do a hardware benchmark, as well as seeing how good it is in real time tasks.
Knowing that there is a sort of wifi interrupt is enough,
but as i don't need it, is there a way to deactivate it?