GithubHelp home page GithubHelp logo

Comments (8)

arneboe avatar arneboe commented on June 22, 2024 1

I am using your minimal responder example with platformio and the arduino framework on an ESP32-32D as dmx device and the Botex Dr. RDM I DMX RDM Tester as rdm master.

from esp_dmx.

someweisguy avatar someweisguy commented on June 22, 2024

Thanks for opening this issue. I am aware of the problem and am working to resolve it! I have been slow to do so because I just moved across the country so it has been difficult to find time to do more debugging. :)

This issue appears to be related to PR #80, which was intended to allow for this library to be ported to different microcontrollers. The commit you mention, f148f7b, fixed an issue with dmx_send() as mentioned in issue #83, but is now causing an issue with dmx_receive(). It appears that the issue is caused by this line. Setting the field at that line to true fixes dmx_receive(), but breaks dmx_send() and vice versa.

I'll investigate further!

from esp_dmx.

someweisguy avatar someweisguy commented on June 22, 2024

Aha! It looks like it was a simple mistake with how the dmx_receive() function was notifying the DMX driver that a task was awaiting data. It appears that this may have been fixed in 6534cf6. I'll do some more testing before closing this issue.

Give the latest commit a try and let me know if you run into any more issues! :)

from esp_dmx.

arneboe avatar arneboe commented on June 22, 2024

Thanks for the quick response :-)
The latest commit fixed it. Thank you!!

from esp_dmx.

arneboe avatar arneboe commented on June 22, 2024

Looks like it also broke rdm.
Starting from f148f7b I do no longer get rdm responses on my rdm tester.
This is still broken in the last commit.

from esp_dmx.

someweisguy avatar someweisguy commented on June 22, 2024

Thanks for the feedback! I am successfully using RDM on Arduino with two ESP32s on the ESP-IDF.

Are you using Arduino? I see that that I am unable to process RDM on Arduino.

from esp_dmx.

someweisguy avatar someweisguy commented on June 22, 2024

It appears that the issue is caused by this line. Setting the field at that line to true fixes dmx_receive(), but breaks dmx_send() and vice versa.

I'm revisiting this comment. It looks like I was chasing my own tail for a bit here. The issue with dmx_receive() appears to have been an issue with the task notification as I mentioned above. The issue with dmx_send() was created when I set the field in the above line to false. I undid this and it appears RDM is working on Arduino again.

EDIT: But now ESP-IDF sending is broken again! 🙃

from esp_dmx.

someweisguy avatar someweisguy commented on June 22, 2024

Okay, I believe I have finally fixed this. It was an issue with the auto_reload flag in the ESP32 hardware timer. In this library, the hardware timer is used for many purposes, including generating the DMX break and MAB, as well as timing the RDM bus to ensure that requests and responses are sent only when they are allowed to be sent. The auto_reload flag tells the hardware timer to automatically reset its counter back to 0 when the timer has finished counting down to its alarm value.

Between ESP-IDF v4 (which is what Arduino still uses, since Arduino has not updated their ESP32 framework yet) and ESP-IDF v5, the driver for the hardware timer changed. In the v4 hardware timer driver, the auto_reload flag is set once when initializing the hardware timer. In the v5 driver, the auto_reload flag is set whenever setting a new alarm for the hardware timer. In v4, the auto_reload flag is set to true. In v5, the auto_reload flag is set to false except when using the timer to send the DMX break.

For some reason setting the auto_reload flag to true at all times in v5 causes the problem we are seeing. This is the behavior I found even though setting auto_reload to true at all times in v4 does not cause a problem. I can only pray to the ESP32 gods that this isn't a bug in the v5 driver that will be fixed in a later ESP-IDF version. Otherwise, the HAL layer will become much more complicated.

This has been fixed and merged from #91. Please reopen this issue if you see any further problems!

from esp_dmx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.