Use RMT to recognize pulse train
Posted: 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.
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.