Page 2 of 2

Re: RMT - simplest receive example working, but idle_threshold problem

Posted: Wed Oct 09, 2019 1:29 pm
by Thildemar
Thanks, I'll see if this works for my project. Cheers!

Re: RMT - simplest receive example working, but idle_threshold problem

Posted: Wed Nov 13, 2019 7:27 pm
by jw--rt
Hello everyone,

That last solution works like a charm for me! It's a bit hacky, but whatever!
What I changed is: I just readout the first value in memory and immediately after that use:

Code: Select all

rmt_item32_t* item = nullptr; // NULL
rmt_rx_start(RMT_CHANNEL_N, true);

for(;;)
{
    item = (rmt_item32_t*) (RMT_CHANNEL_MEM(RMT_CHANNEL_N));
    // Do math with item->duration0 and item->duration1
    rmt_memory_rw_rst(RMT_CHANNEL_N);
    vTaskDelay(DELAY_TIME_MS/portTICK_PERIOD_MS);
}
Thank you @jcsbanks for putting your time into investigating that!

Additionally, it solves my problem in my post viewtopic.php?t=12873.
I just haven't thought about using the RMT module.


Best regard,

jw--rt

Re: RMT - simplest receive example working, but idle_threshold problem

Posted: Wed Nov 13, 2019 9:12 pm
by jcsbanks
Is that loop ever going to be blocked/yield or just burn up CPU cycles?

Re: RMT - simplest receive example working, but idle_threshold problem

Posted: Wed Nov 13, 2019 9:50 pm
by jw--rt
Hello,

good point. For completeness, I edited my answer.

Best regards,

jw--rt