Page 1 of 1

Using esp-idf framework for ESP8266?

Posted: Fri Apr 06, 2018 10:51 am
by btomic
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 (https://github.com/stickbreaker/OneWire ... e.cpp#L149).

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

Re: Using esp-idf framework for ESP8266?

Posted: Fri Apr 06, 2018 3:04 pm
by WiFive
No

Re: Using esp-idf framework for ESP8266?

Posted: Sat Apr 07, 2018 3:18 am
by ESP_Sprite
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.

Re: Using esp-idf framework for ESP8266?

Posted: Mon Aug 19, 2019 6:21 am
by cranphin
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: https://github.com/espressif/ESP8266_RT ... issues/680 :)