RMT and infrared on IDF 3.3

philippe_44
Posts: 26
Joined: Thu May 23, 2019 3:05 pm

RMT and infrared on IDF 3.3

Postby philippe_44 » Sat May 09, 2020 4:54 am

Hi - I guess I'm missing something very obvious but I can't get the RMT driver to work properly in IDF 3.3. I initially tried in my larger project (SW+HW) and as it was not detecting commands I moved to just the rmt_nec_tx_rx example and a WROVER on DevKitC and it still does not work - and it's driving me nuts.

The sample code is *unchanged*. The driver receives my IR codes, but all timing reported by the RMT items are wrong, typically 7.3ms and 3.6ms for the leading pulse and space, so of course the whole sequence is discarded.

I've verified with a scope that at the physical level, all timings from my IR receiver that are connected to the GPIO are correct: the leading pulse is 9ms and following space is 4.5ms and all the rest is as expected. It's just the esp32 that counts it wrong.

The example work in loop mode, but timing observed on the GPIO's are wrong, I assume this is linked to the lack of carrier enablement in loop mode.

The menuconfig is just the default config. I'm not playing with APB frequency.

What am I doing wrong ??? I've searched and nobody seems to face a similar problem. Again, I'm now down to the very sample code and default config on a basic dev kit :cry:

philippe_44
Posts: 26
Joined: Thu May 23, 2019 3:05 pm

Re: RMT and infrared on IDF 3.3

Postby philippe_44 » Sat May 09, 2020 5:37 am

Replying to my own question ... my bad (to some extend). I was reading the duration0/duration1 value before scaling to µs. So the different is not 7300 vs 9000, but more the fact that the margin should be set to 150µs rather than 20µs. I've tried with different remotes and got the same result ...

Who is online

Users browsing this forum: Google [Bot] and 420 guests