RTC Interrupt Handling
RTC Interrupt Handling
Postby skywave » Mon Nov 16, 2015 3:36 am
I am generating a 1000Hz PWM signal on GPIO with 0.5us ON. On RTC interrupt I set the pin (ON), wait for 0.5us (nops) and then clear GPIO, clear interrupt and reset RTC timer. However more than once a second the interrupt instead of taking 0.5us takes 2us (at 160MHz) or 3us (at 8MHz). I don't know why this occurs. Is it possible that the RTC interrupt is beign "interrupted" by another one (some other ESP8266 task)? Or is it a bug?
Re: RTC Interrupt Handling
Postby dkinzer » Mon Nov 16, 2015 9:21 am
The ESP has non-maskable interrupts. These can interrupt "normal" interrupt service routines even if interrupts are disabled.skywave wrote:Is it possible that the RTC interrupt is beign "interrupted" by another one (some other ESP8266 task)?
I've see discussion of a method to block non-maskable interrupts but I haven't tried it.
http://www.esp8266.com/viewtopic.php?f= ... 9&start=20
Don Kinzer
Beaverton, OR, USA
Beaverton, OR, USA
- rosematters
- Posts: 1
- Joined: Mon Nov 16, 2015 1:12 pm
- Location: Banks, AL
Re: RTC Interrupt Handling
Postby rosematters » Mon Nov 16, 2015 5:44 pm
It might be because the general problem with RTC. I think you know that the RTC is less flexible, and thus it is not widely used. It shows some irritating behavior as well. Sometimes it switches off before the time expires and toggles between time periods. It has the ability to handle only 15 possible interrupt rates. I think this characteristic maybe the cause of getting delay.
Who is online
Users browsing this forum: No registered users and 139 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.