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?
Using esp-idf framework for ESP8266?
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: Using esp-idf framework for ESP8266?
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.
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?
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 :)
Details and issue here: https://github.com/espressif/ESP8266_RT ... issues/680 :)
Who is online
Users browsing this forum: Bing [Bot], Corand and 123 guests