Skip to content
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

ESP32 I2S 8/16 bits parallel channel support (WIP) #606

Merged
merged 12 commits into from
Jan 5, 2023

Conversation

awawa-dev
Copy link
Contributor

The work is based on Makuna Esp32I2sX parallel development branch. I added some critical bug fixes and now the library is able to generate a well-formed signal using parallel output (still clock needs to be adjusted). Due to limitation 'true' 8 bits parallel mode is only available for i2s1 interface (NeoEsp32I2s1X8Ws2812Method). For ESP32/16bit mode there is a method NeoEsp32I2s0X16Ws2812Method, and for ESP32S2 (tested with mini lolin) NeoEsp32I2s0X8Ws2812Method: this method is 8 channels but it's working with 16 bits sample DMA. Both NeoEsp32I2s0X16Ws2812Method and NeoEsp32I2s0X8Ws2812Method are using I2S0 interface.

To do:

  • Signal clock is too low. NeoEsp32I2s1X8Ws2812Method produces 400KHz signal and NeoEsp32I2s0X16Ws2812Method&NeoEsp32I2s0X8Ws2812Method produce 200KHz signal. Each of my attempts to increase the frequency results in doubling the DMA buffer at the output (but at least it's valid 800KHz).
  • Regression testing. Due to the numerous changes that have taken place in this PR (especially regarding the critical clock) it is necessary to verify whether the single-channel methods using the ESP32 I2S still work properly.
  • Add NeoEsp32I2s0X8Ws2812Method for ESP32 and NeoEsp32I2s0X16Ws2812Method for ESP32S2?
  • Verify if ESP32-S2 methods are compatible with ESP32-C3

@awawa-dev awawa-dev changed the base branch from master to Esp32I2sX January 4, 2023 23:22
Copy link
Owner

@Makuna Makuna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly some comment additions, one allocation move.

Also, make sure no tabs, tabs should be replaced with 4 spaces. Not that I had seen any, but the review tool doesn't make it easy to spot them.

src/internal/Esp32_i2s.c Outdated Show resolved Hide resolved
src/internal/Esp32_i2s.c Outdated Show resolved Hide resolved
src/internal/NeoEsp32I2sXMethod.h Outdated Show resolved Hide resolved
src/internal/NeoEsp32I2sXMethod.h Show resolved Hide resolved
src/internal/NeoEsp32I2sXMethod.h Outdated Show resolved Hide resolved
src/internal/NeoEsp32I2sXMethod.h Show resolved Hide resolved
src/internal/NeoEsp32I2sXMethod.h Outdated Show resolved Hide resolved
@awawa-dev awawa-dev requested a review from Makuna January 5, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants