Use RMT to recognize pulse train

romeo987
Posts: 4
Joined: Wed May 13, 2020 3:31 am

Use RMT to recognize pulse train

Postby romeo987 » Tue Jun 09, 2020 2:50 am

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.

User avatar
jgustavoam
Posts: 165
Joined: Thu Feb 01, 2018 2:43 pm
Location: Belo Horizonte , Brazil
Contact:

Re: Use RMT to recognize pulse train

Postby jgustavoam » Sat Jun 20, 2020 3:11 am

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
Retired IBM Brasil
Electronic hobbyist since 1976.

Who is online

Users browsing this forum: No registered users and 49 guests