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.
RMT interface not working after last update SDK
Re: RMT interface not working after last update SDK
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...
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...
-
- Posts: 9757
- Joined: Thu Nov 26, 2015 4:08 am
Re: RMT interface not working after last update SDK
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
I think the transmission (tx) has broken because it is used to control the ws2812ESP_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.
Re: RMT interface not working after last update SDK
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;
}
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;
}
-
- Posts: 56
- Joined: Sun Dec 18, 2016 9:17 pm
Re: RMT interface not working after last update SDK
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
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
-
- Posts: 263
- Joined: Sun Jun 19, 2016 12:00 am
Re: RMT interface not working after last update SDK
And I was wondering why it kept crashing. Thanks, that was a life saver!
-
- Posts: 56
- Joined: Sun Dec 18, 2016 9:17 pm
Re: RMT interface not working after last update SDK
Was it actually crashing or just not working? I hadn't seen crashes though I hope it's all good now!BuddyCasino wrote:And I was wondering why it kept crashing. Thanks, that was a life saver!
Who is online
Users browsing this forum: No registered users and 299 guests