In relation to my project as documented in the Wireless&RF section , I need to solve how to count a high speed set of pulses using an ESP8266 running on esp-open-rtos.
The article here already confirms that this is a true challenge and I am actually looking for another approach.
I hope that the ESP8266 has a way to use the counter that is normally used for a timer can also be triggered by a GPIO input instead of the CPU clock/divider.
My code would reset the counter, trigger the LC circuit to generate pulses every 3µs and after 100µs or whenever convenient I would read out the counter value. Depending on the position of the water meter dial, that counter value would vary between 5 and 30.
The key reason I cannot use an interrupt based approach is that handling an interrupt supposedly is going to take longer than the pulse distance and it would also be hogging the CPU (see article referenced above).
The challenge I have is that these counters are very badly documented and I am not sure if the ESP8266 can be programmed as proposed.
In the latter case I would probably introduce a hardware counter, but that feels like a pity if we could do it on the ESP8266.
Anyone knows if this plan is possible, and if so, some hints would be nice ;-)
PS. there might be a problem if this is not compatible with the I2S output, which I use to generate the LC trigger signal (V(n012) and V(n002)).
Figure 1: The objective is to tell how many pulses are at V(out) after a trigger, the time they take is not relevant.

The article here already confirms that this is a true challenge and I am actually looking for another approach.
I hope that the ESP8266 has a way to use the counter that is normally used for a timer can also be triggered by a GPIO input instead of the CPU clock/divider.
My code would reset the counter, trigger the LC circuit to generate pulses every 3µs and after 100µs or whenever convenient I would read out the counter value. Depending on the position of the water meter dial, that counter value would vary between 5 and 30.
The key reason I cannot use an interrupt based approach is that handling an interrupt supposedly is going to take longer than the pulse distance and it would also be hogging the CPU (see article referenced above).
The challenge I have is that these counters are very badly documented and I am not sure if the ESP8266 can be programmed as proposed.
In the latter case I would probably introduce a hardware counter, but that feels like a pity if we could do it on the ESP8266.
Anyone knows if this plan is possible, and if so, some hints would be nice ;-)
PS. there might be a problem if this is not compatible with the I2S output, which I use to generate the LC trigger signal (V(n012) and V(n002)).
Figure 1: The objective is to tell how many pulses are at V(out) after a trigger, the time they take is not relevant.
