RMT interface not working after last update SDK

salara
Posts: 4
Joined: Mon Jul 03, 2017 12:25 pm

RMT interface not working after last update SDK

Postby salara » Mon Jul 03, 2017 12:49 pm

Good day.
In my project (mqtt_client + ws2812) i used SDK from https://github.com/espressif/esp-idf and example from https://github.com/FozzTexx/ws2812-demo for control ws2812. To control leds in this example use the RMT interface.
This example worked well until I updated SDK (last update 5 days ago).
After last update master-branch SDK, RMT interface does not work as before.
What has changed in RMT in the last update ? Somebody faced such problem?
Thank you.

abasir
Posts: 1
Joined: Tue Jun 20, 2017 12:21 am

Re: RMT interface not working after last update SDK

Postby abasir » Sun Jul 09, 2017 11:21 am

Yup, it does not seems to work with latest SDK update.
I was using https://github.com/MartyMacGyver/ESP32- ... ED-drivers with no issue prior to update.

Not sure what was changed but looking forward to the updated library soon.
I'm a newbie, still trying to grasp the ESP32 and the ESP-idf... ;)

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: RMT interface not working after last update SDK

Postby ESP_Sprite » Mon Jul 10, 2017 2:42 am

Could you give us some more details re what broke (Tx/Rx/both/...)? It would be really awesome if you also could make a Github issue for this (here), that makes it easier for us to track it and inform you when we fix it.

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

Re: RMT interface not working after last update SDK

Postby WiFive » Mon Jul 10, 2017 2:45 am


salara
Posts: 4
Joined: Mon Jul 03, 2017 12:25 pm

Re: RMT interface not working after last update SDK

Postby salara » Mon Jul 10, 2017 7:05 am

ESP_Sprite wrote:Could you give us some more details re what broke (Tx/Rx/both/...)? It would be really awesome if you also could make a Github issue for this (here), that makes it easier for us to track it and inform you when we fix it.
I think the transmission (tx) has broken because it is used to control the ws2812

salara
Posts: 4
Joined: Mon Jul 03, 2017 12:25 pm

Re: RMT interface not working after last update SDK

Postby salara » Mon Jul 10, 2017 4:16 pm

Miracles with RMT: the interface earned without any significant changes !
Than to explain it I do not know - "impure force".
The control function is as follows (сopy of the function from https://github.com/FozzTexx/ws2812-demo):
void ws2812_setColors(unsigned int length, rgbVal *array)
{
wlen = (length * 3);
wbuffer = malloc(wlen);
if (wbuffer) {
for (unsigned int i = 0; i < length; i++) {
wbuffer[0 + i * 3] = array.g;
wbuffer[1 + i * 3] = array.r;
wbuffer[2 + i * 3] = array.b;
}
wpos = whalf = 0;
ws2812_copy();
if (wpos < wlen) ws2812_copy();
RMT.conf_ch[RMTCHANNEL].conf1.mem_rd_rst = 1;
RMT.conf_ch[RMTCHANNEL].conf1.tx_start = 1;
wsem = xSemaphoreCreateBinary();
xSemaphoreTake(wsem, portMAX_DELAY);
vSemaphoreDelete(wsem);
wsem = NULL;
free(wbuffer);
}
return;
}

MartyMacGyver
Posts: 56
Joined: Sun Dec 18, 2016 9:17 pm

Re: RMT interface not working after last update SDK

Postby MartyMacGyver » Fri Sep 01, 2017 7:41 am

FYI, I've opened a bug against the esp-idf - not sure if it's a bug there or something that requires a bit more code on our part to enable.

https://github.com/espressif/esp-idf/issues/949

Edit: And I think it's resolved by a user code change (that is, I don't think the IDF is broken). See the issue for details on how to make the RMT work. I've updated my drivers to use this change for ESP-IDF builds as well as Arduino-ESP32 builds:

https://github.com/MartyMacGyver/ESP32- ... ED-Drivers

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: RMT interface not working after last update SDK

Postby BuddyCasino » Fri Sep 01, 2017 11:22 am

And I was wondering why it kept crashing. Thanks, that was a life saver!

MartyMacGyver
Posts: 56
Joined: Sun Dec 18, 2016 9:17 pm

Re: RMT interface not working after last update SDK

Postby MartyMacGyver » Fri Sep 01, 2017 11:56 pm

BuddyCasino wrote:And I was wondering why it kept crashing. Thanks, that was a life saver!
Was it actually crashing or just not working? I hadn't seen crashes though I hope it's all good now!

Who is online

Users browsing this forum: No registered users and 84 guests