Open julienhogert opened 2 years ago
Hi,
I’m away from the office. I can’t really give you a detailed reply. But, with ESP32, the DMX RX is dependent on the SDK/Arduino board version. Only 2.0.2 and later works without modifying the hal_uart.c file in the board core. Can you let me know what the version of the Arduino board manager’s ESP32 you are using?
-Claude Heintz
--This message is being sent to you from Claude Heintz Design. If you prefer not to receive e-mail from Claude Heintz Design, reply to this message with NO CONTACT as the subject line.
On Aug 2, 2022, at 11:00 AM, julienhogert @.*> wrote: Hello, Thanks again for the amazing work you did, creating these wonderful sets of libraries, For a project, I need a very small controller with a RS485 dmx receiver. I was planning to use the M5stamp C3U With the RS485 module I make a little try with the modules (connecting the RX of the modules), a DMX Enttec pro MK2 and the LXESP32DMX library. To make it compile I had to make small changes in the LXHardwareSerial.cpp here, line 62 // ** MODIF JULIEN #ifdef CONFIG_IDF_TARGET_ESP32C3 asm volatile ("rdcycle x1" : "=r" (ccount) ); #else asm volatile ( "rsr %0, ccount" : "=a" (ccount) ); #endif if(ccount < lccount){ //*** MODIF JULIEN #ifdef CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ overflow += UINT32_MAX / CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ; #else overflow += UINT32_MAX / CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ; #endif } lccount = ccount; portEXIT_CRITICAL_ISR(&privateMicrosMux); //***** MODIF JULIEN #ifdef CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ return overflow + (ccount / CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ); #else return overflow + (ccount / CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ); #endif
line 176 // **** MODIFICATION JULIEN #ifdef UART2 return &UART2; #else return &UART1; #endif line361 } else if( _uart_nr == 2 ) { // *** MODIFICATION JULIEN: #ifdef U2TXD_OUT_IDX gpioSig = U2TXD_OUT_IDX; #else gpioSig = U1TXD_OUT_IDX; #endif
Then the program compile. But obviously it didn't work, because I was thought to be used with the UART2 and the modified_uart. I tried to make it receive Artnet... it work for fews frames and then reboot. But before digging deeper, do you think it could possibly work, tweaking the original code? Do you think there is still a lot of work ? Thanks for your advice, Julien
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.
Hello, Thanks again for the amazing work you did, creating these wonderful sets of libraries, For a project, I need a very small controller with a RS485 dmx receiver. I was planning to use the M5stamp C3U With the RS485 module I make a little try with the modules (connecting the RX of the modules), a DMX Enttec pro MK2 and the LXESP32DMX library. To make it compile I had to make small changes in the LXHardwareSerial.cpp here, line 62 ` // ** MODIF JULIEN
ifdef CONFIG_IDF_TARGET_ESP32C3
line 176 ` // **** MODIFICATION JULIEN
ifdef UART2
line361 ` } else if( _uart_nr == 2 ) { // *** MODIFICATION JULIEN:
ifdef U2TXD_OUT_IDX
Then the program compile. But obviously it didn't work, because I was thought to be used with the UART2 and the modified_uart. I tried to make it receive Artnet... it work for fews frames and then reboot. But before digging deeper, do you think it could possibly work, tweaking the original code? Do you think there is still a lot of work ? Thanks for your advice, Julien