Using esp-idf framework for ESP8266?

Posts: 2
Joined: Fri Apr 06, 2018 10:06 am

Using esp-idf framework for ESP8266?

Postby btomic » Fri Apr 06, 2018 10:51 am

Is it possible to use esp-idf framework for ESP8266-12 chip?

I'm using ESP8266 with ESP8266_RTOS_SDK and have found a problem with a sensitive 1-Wire bus timing (affected by the WiFi interrupts despite using taskENTER_CRITICAL/taskEXIT_CRITICAL macros). Then I found that esp-idf has a different implementation of those macros which prevents critical sections from being interrupted by the WiFi. This was pointed out by 'stickbreaker' in his implementation of the 1-Wire bus ( ... e.cpp#L149).

However, I could not flash the 'hello-world' example code to ESP8266. Does esp-idf support ESP8266 at all?

Posts: 2999
Joined: Tue Dec 01, 2015 7:35 am

Re: Using esp-idf framework for ESP8266?

Postby WiFive » Fri Apr 06, 2018 3:04 pm


Posts: 4241
Joined: Thu Nov 26, 2015 4:08 am

Re: Using esp-idf framework for ESP8266?

Postby ESP_Sprite » Sat Apr 07, 2018 3:18 am

Also, I'm not sure if the ESP8266 would work at all with WiFi interrupts disabled... from memory, it needs the processor to service certain situations within a very short timeframe, so it uses high-priority interrupts to do so.

The difference between the critical sections between esp-idf and the earlier SDKs is mostly because the ESP32 is dual-core, by the way: disabling interrupts isn't enough there because it won't stop the other CPU from accessing your critical values, so it's implemented as a spinlock instead.

Posts: 8
Joined: Mon Apr 02, 2018 12:31 pm

Re: Using esp-idf framework for ESP8266?

Postby cranphin » Mon Aug 19, 2019 6:21 am

I tried solving this by (trying to ?) disabling all irq's, which improves things. But still timing tends to be off sometimes.
Details and issue here: ... issues/680 :)

Who is online

Users browsing this forum: Google [Bot] and 44 guests