I have some pulse shaping applications that are very sensitive to correct timing (in the 100ns-range).
After some experiments I found that even though I disabled interrupts during my function, I still get interrupted, and I assume thats the NMI which I cannot turn off.
However someone pointed me towards the hw_timer implementation where I can actually execute code from within the NMI, and that means that another NMI cannot interrupt me - great!
Unfortunately I just found out that the hw_timer stuff with NMI doesn't seem exist in the RTOS SDK. Stuff is missing from the header files, I could add that, but then it seems that some internal stuff is missing from libmain.a (NmiTimSetFunc) and that's a binary blob I don't have access to.
So the question is: is there any way to use an NMI-based hw_timer in the RTOS SDK? Or any other way to capture and/or disable the NMI in the RTOS SDK? I only need uninterruptible control for a very short period (~ 10 microseconds).
rhaenel wrote: I only need uninterruptible control for a very short period (~ 10 microseconds).
Do you mean that this 10 microseconds can not be interrupt by NMI either ?
1. Call wifi_set_opmode(NULL_MODE); first, then enter critical state. These will allow an uninterruptible control for about 1.5 seconds.
2. Call wifi_set_opmode to set a normal Wi-Fi mode, then enter critical state. Only Wi-Fi NMI can interrupt task or other interrupts.
Thanks for your interest in Espressif Systems and ESP8266 !
Calling wifi_set_opmode(NULL_MODE); would kill the current WiFi connection, correct? If I enable station mode after the time critical stuff (10us), this will trigger WiFi connect including DHCP etc. again, correct?
I haven't seen a PWM example using NMI. The PWM code in the v0.9.5 SDK IOT_demo directory uses a regular interrupt. Earlier versions of the SDK (e.g. v0.6) had PWM example code that used os_timer_setfn(). Do you have a URL for PWM code that uses NMI?eriksl wrote:AFAIK pwm also uses nmi,
Beaverton, OR, USA
I am using v1.2.0. I was referring to the example pwm.c code found in the earlier versions of the SDK that is not present in 1.2.0.eriksl wrote:Current sdk is 1.2.0, why would you use 0.9.5? See include/pwm.h.
Beaverton, OR, USA
Who is online
Users browsing this forum: Baidu [Spider] and 9 guests
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
We also have a RTOS version and a MESH version too!
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!