I am missing some detailed information about the hardware (!) timers. Sometimes the software timers or the sdk interface are just not enough. Coming from ATMega devices, where the timers are very thorougly documented and easy to use.

I have found some #defines that tell where to load and read the timer current value. I assume there are no "compare values" like on the ATmega, it simply counts down to zero and then, if configured, fires and interrupt?

When I am using os_timer_* functions (not hw_timer, as documented), I find that any interrupt handler attached to FRC1 is not called. This is not documented. Is that correct? When I change the interrupt source for FRC1_NMI, it is called indeed. Can this be explained?

Is there a way to have an interrupt connected to FRC2? What does the SDK code use FRC2 for itself, will it interfere with SDK code when I use it myself?

Also I found that as soon as the FRC1_NMI is used, the pin change interrupts stop working. This is also not documented. Please explain.

We will release detailed documentation on the timers soon. The timers are used for timing processes or internal operations, especially in RTOS SDKs and AT firmware code, so it gets a lot more complex than ATmega devices.Meanwhile, I may try to write an article on this in a couple of days. I will keep the thread updated.

Pratik, if you could shed any light on the most low-level operation of timers, it would be VERY VERY much appreciated!

I understand your concerns, you should know in my case I am using the "bare metal" as much as possible, so there is no RTOS, and no AT code. Also I am moving away from the (non-RTOS) SDK code for PWM, pin change interrupts and timer functions. That would leave little, maybe even none, users of timers outside my own code. I guess that depends on how wlan frames are passed to the SDK code, if that code is using timers and or interrupts.

We will release detailed documentation on the timers soon. The timers are used for timing processes or internal operations, especially in RTOS SDKs and AT firmware code, so it gets a lot more complex than ATmega devices.Meanwhile, I may try to write an article on this in a couple of days. I will keep the thread updated.

hello,I've gone through hardware timer APIs in 8266 API guide, but still from it and given sample code in hw_timer.c and .h files, i'm not clear about hardware timer's operations. earlier it was mentioned like detailed documents would be released soon. so is there any reference material available for further understanding? or i'm left with that API guide and hw_timer.c and .h, provided in SDK, only?

Documentation

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.