RMT - simplest receive example working, but idle_threshold problem

Thildemar
Posts: 3
Joined: Mon Oct 07, 2019 4:22 pm

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

Postby Thildemar » Wed Oct 09, 2019 1:29 pm

Thanks, I'll see if this works for my project. Cheers!

jw--rt
Posts: 7
Joined: Mon Jul 01, 2019 1:44 pm

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

Postby jw--rt » Wed Nov 13, 2019 7:27 pm

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
Last edited by jw--rt on Wed Nov 13, 2019 9:50 pm, edited 3 times in total.

jcsbanks
Posts: 289
Joined: Tue Mar 28, 2017 8:03 pm

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

Postby jcsbanks » Wed Nov 13, 2019 9:12 pm

Is that loop ever going to be blocked/yield or just burn up CPU cycles?

jw--rt
Posts: 7
Joined: Mon Jul 01, 2019 1:44 pm

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

Postby jw--rt » Wed Nov 13, 2019 9:50 pm

Hello,

good point. For completeness, I edited my answer.

Best regards,

jw--rt

Who is online

Users browsing this forum: MSN [Bot] and 18 guests