Page 1 of 1

Use RMT to recognize pulse train

Posted: Tue Jun 09, 2020 2:50 am
by romeo987
I have a device that encodes its error status as a 16.5Hz pulse train of either 25% or 50% duty cycle. I was hoping to use the RMT peripheral to read this, rather than using interrupt driven timers to Measure the pulse width. But from my reading of the docs, RMT only raises an interrupt when the incoming pulse sequence is complete (idle time exceeded) and in the meantime, there is no actual way of determining the status ( E.g., by reading the index, or some sort of busy flag, etc). Of course, with a continuous pulse train, it never finishes.
I guess I can wait till RMT puts data into an external buffer and check the contents of the buffer, but now that’s starting to sound no less complex than my original timer solution.
Am I missing something?
Roman o.

Re: Use RMT to recognize pulse train

Posted: Sat Jun 20, 2020 3:11 am
by jgustavoam
Hi,
I suggest you read the chapter 15 (Remote Control Peripheral) of the ESP32 Technical Reference manual.
I think it may be useful to you.

https://www.espressif.com/sites/default ... ual_en.pdf

and the API reference :
https://docs.espressif.com/projects/esp ... s/rmt.html