-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with installing DMX on UART2 #150
Comments
assume you checked the pins, some UARTS have non moveable UART functions (i.e the C6 UART2 has to be on 5 & 4) |
Thanks for the reply. The problem is the code never gets to the point where it can set the pins for UART2, if i comment everything out but the dmx_driver_install for UART2, it still crashes. I looked into the CONFIG_IDF_TARGET_ESP32C6 #ifdef's and commented out the code just to make sure it was initialising UART2 normally and it still crashes. The pins for UART2 should be remappable for the WT32-ETH01 dev board. I have also made sure that I can setup a serial output on UART2 and that works, so the port can definitely be used. I have got DMX output working for UART0 (tx pin 1), UART1 (tx pin 17 or 14), but I cannot get it to work on UART2 |
Ok I got it working. Not sure whats going wrong but heres how I fixed it. The program was failing whenever it hit uart_ll_set_sclk due to a null pointer at uart->dev
I now have 3 seperate DMX TX outputs tested and working. Im not sure why this fix works as the ESP32 core should have 3 UARTS available and I had tested this with HardwareSerial. |
Agree, I also in past versions had to code out the same struct #if test for UART2 and force it, although the latest code works for the LP UART on the C6. |
Hello!
Currently |
This sounds like a problem I have having as well. I have just tried to upgrade from 3.0.3-beta that I have been successfully using on esp-idf 4.4.5 with DMX_NUM_1 and DMX_NUM_2 as the 2 UARTS. I am using an original ESP32-WROVER Now I have 4.1.0 it crashes when trying to install the dmx driver for UART2. I have not changed the version of esp-idf.
|
Seems the same as issue #150
#150 (comment)
From: Ben Suffolk ***@***.***>
Sent: Tuesday, June 11, 2024 5:32 PM
To: someweisguy/esp_dmx ***@***.***>
Cc: riwalker ***@***.***>; Comment ***@***.***>
Subject: Re: [someweisguy/esp_dmx] Problem with installing DMX on UART2 (Issue #150)
This sounds like a problem I have having as well. I have just tried to upgrade from 3.0.3-beta that I have been successfully using on esp-idf 4.4.5 with DMX_NUM_1 and DMX_NUM_2 as the 2 UARTS.
I am using an original ESP32-WROVER
Now I have 4.1.0 it crashes when trying to install the dmx driver for UART2. I have not changed the version of esp-idf.
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
..
#0 0x400fb617:0x3ffb8240 in uart_ll_set_sclk at /Users/suffo_b/.platformio/packages/framework-espidf/components/hal/esp32/include/hal/uart_ll.h:76
(inlined by) dmx_uart_init at components/esp_dmx-4.1.0/src/dmx/hal/uart.c:357
#1 0x400f779d:0x3ffb8260 in dmx_driver_install at components/esp_dmx-4.1.0/src/dmx/driver.c:226
—
Reply to this email directly, view it on GitHub <#150 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABIKT5XPKLOZLNF37ZFMQVTZG5UDZAVCNFSM6AAAAABFKY2YKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNRRGYZTCMJYHE> .
You are receiving this because you commented. <https://github.com/notifications/beacon/ABIKT5VA55XQGCIWLV7HDQLZG5UDZA5CNFSM6AAAAABFKY2YKCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUA27P5K.gif> Message ID: ***@***.*** ***@***.***> >
|
Can confirm this is the correct solution and is working well. I have created a pull request for #158 for when @someweisguy has an opportunity to merge it. |
Great, thanks! And just to correct myself, I'm using an ESP32-S3, not C3 (C3 only has 2 UARTs).
|
I can confirm this issue. Simply take the Arduino_DMXWrite.ino file example (I'm using PlatformIO so I've changed it to Arduino_DMXWrite.cpp). Is there any news on when we get a fix? And can anyone tell me when was the last 'good' version for using DMX_NUM_2? (I used 2.0.2, but I see the timing and mark information have improved hugely since then, and I would be keen to use the latest). It works on when
Note line 58 is: Line 226 in esp_dmx/src/dmx/driver.c
Line 357 esp_dmx/src/dmx/hal/uart.c
I am using IDF version 4.4.7 in the Arduino platform. PlatormIO.ini relevant details:
|
Did you download the latest version, this was fixed in a pull request #158 and is working fine for me now. |
Im on a new computer and I used the Arduino library manager to download the latest esp_dmx (v4.1.0) library. It seems that the commit that fixed this problem hasn't been applied to wherever Arduino downloads it from. I only found this out after building and crashing because of UART 2 again. I deleted the esp_dmx library from file explorer and downloaded it again through Arduino and still the same outcome. I then downloaded it straight from github and now I have the latest changes and everything is working. @bensuffolk @someweisguy I think this is why some people are still running into this issue. |
@k-dedman I have no idea how the Arduino library download thing works as I use ESP-IDF framework. I assume @someweisguy has to tell them there is a new version so that it can be set as the one to download. But now you have posted a fix hopefully anybody googling the issue will find the solution. |
Any time I try to set up UART2 with dmx_driver_install the program crashes. I am trying to setup all 3 UART ports with a DMX output, I do not need RX or the enable pin. I have tried setting up UART2 on an ESP32-WROOM-32D and a WT32-ETH01 module, both modules crash when trying to setup UART2. UART0 & UART1 are working as intended. I have stripped my project to only setup UART2 and it still crashes. I am using Arduino IDE with esp_dmx 4.1.0
The text was updated successfully, but these errors were encountered: