Page 1 of 1

RMT interface not working after last update SDK

Posted: Mon Jul 03, 2017 12:49 pm
by salara
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.

Re: RMT interface not working after last update SDK

Posted: Sun Jul 09, 2017 11:21 am
by abasir
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... ;)

Re: RMT interface not working after last update SDK

Posted: Mon Jul 10, 2017 2:42 am
by ESP_Sprite
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.

Re: RMT interface not working after last update SDK

Posted: Mon Jul 10, 2017 2:45 am
by WiFive

Re: RMT interface not working after last update SDK

Posted: Mon Jul 10, 2017 7:05 am
by salara
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

Re: RMT interface not working after last update SDK

Posted: Mon Jul 10, 2017 4:16 pm
by salara
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;
}

Re: RMT interface not working after last update SDK

Posted: Fri Sep 01, 2017 7:41 am
by MartyMacGyver
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

Re: RMT interface not working after last update SDK

Posted: Fri Sep 01, 2017 11:22 am
by BuddyCasino
And I was wondering why it kept crashing. Thanks, that was a life saver!

Re: RMT interface not working after last update SDK

Posted: Fri Sep 01, 2017 11:56 pm
by MartyMacGyver
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!