RMT Idle and the ring buffer

jjulicher
Posts: 4
Joined: Fri Aug 30, 2019 7:05 pm

RMT Idle and the ring buffer

Postby jjulicher » Thu Sep 12, 2019 2:15 am

I am using the RMT to decode a Manchester data stream.

The messages do come in bursts but the worst case corner is 704 RMT events in a single message.

I have learned that the ringbuffer is only updated when the RMT idle condition is reached.
With this many RMT events I cannot wait for the idle before unloading the RMT memory and the ringbuffer is not helping me.

I see 3 possible solutions and would love an RMT expert to lend some advice.
1) Reduce the RMT Idle detect time so it will trigger on the manchester phase shifts. Then I apply hope as a strategy and hope the event blocks recorded in the ring buffer are seamless with no missing timing data between the idles.
2) I redesign the manchester parser to use the event block transitions as the bit transitions.
3) Ditch the RMT and use a timer to decode the manchester.

Thanks,
If you are on the wrong road... It is never too late to turn back. <Persian Proverb>

WiFive
Posts: 2624
Joined: Tue Dec 01, 2015 7:35 am

Re: RMT Idle and the ring buffer

Postby WiFive » Fri Sep 13, 2019 11:29 am

I think you can extend the memory up to 1024 records but in that case you can only use a single channel.

jjulicher
Posts: 4
Joined: Fri Aug 30, 2019 7:05 pm

Re: RMT Idle and the ring buffer

Postby jjulicher » Fri Sep 13, 2019 4:01 pm

The datasheet says there are 512 records available in 8 blocks of 64, one block per channel by default. I am using 1 for the TX channel and 7 for the RX channel.
1024 records would be nice... just having a double buffer feeding the ringbuffer would be perfect.
If you are on the wrong road... It is never too late to turn back. <Persian Proverb>

WiFive
Posts: 2624
Joined: Tue Dec 01, 2015 7:35 am

Re: RMT Idle and the ring buffer

Postby WiFive » Sat Sep 14, 2019 8:39 am

512 x 32-bit values which equals 1024 x 16-bit entries/records.

jjulicher
Posts: 4
Joined: Fri Aug 30, 2019 7:05 pm

Re: RMT Idle and the ring buffer

Postby jjulicher » Mon Sep 16, 2019 5:59 pm

Of course, I see that. I was using the language of the datasheet.
For the purposes of manchester, it takes two measurements to represent one transition which is either 1 bit or 1.5 bits.
If you are on the wrong road... It is never too late to turn back. <Persian Proverb>

Who is online

Users browsing this forum: No registered users and 7 guests