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

led_strip component : fix timing by adding the reset signal (IDFGH-7233) #8827

Closed
wants to merge 2 commits into from

Conversation

supcik
Copy link
Contributor

@supcik supcik commented Apr 24, 2022

The current led_strip component does not implement the required reset signal (280µs) at the end of the colors sequence. The constant WS2812_RESET_US is indeed defined, but it is not used.

A simple example such as the following one demonstrates the problem:

led_strip_t *pStrip_a;
pStrip_a = led_strip_init(0, 25, 3);
ESP_ERROR_CHECK(pStrip_a->clear(pStrip_a, 500));
ESP_ERROR_CHECK(pStrip_a->set_pixel(pStrip_a, 0, 16, 16, 16));
ESP_ERROR_CHECK(pStrip_a->refresh(pStrip_a, 500));

The LED does not light up.

We can see on the logical analyzer that the delay between the bursts is too short (45µs instead of 280µs) :

Screenshot 2022-04-24 at 23 15 10

I resolved this issue by adding another byte to the buffer and the ws2812_rmt_adapter uses this additional byte to emit the proper reset signal.

With this fix, the signal looks much better :

Screenshot 2022-04-25 at 00 20 14

... and the LED lights up.

@supcik supcik changed the title fix timing by adding the reset signal led_strip component : fix timing by adding the reset signal Apr 24, 2022
@espressif-bot espressif-bot added the Status: Opened Issue is new label Apr 24, 2022
@github-actions github-actions bot changed the title led_strip component : fix timing by adding the reset signal led_strip component : fix timing by adding the reset signal (IDFGH-7233) Apr 24, 2022
@Alvin1Zhang
Copy link
Collaborator

Thanks for your contribution.

@espressif-bot espressif-bot added Status: In Progress Work is in progress and removed Status: Opened Issue is new labels Apr 25, 2022
@suda-morris suda-morris added the PR-Sync-Merge Pull request sync as merge commit label Apr 25, 2022
@suda-morris
Copy link
Collaborator

sha=c7fe38926a712b283134dc791697f5b2888f2cad

@espressif-bot espressif-bot added Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: In Progress Work is in progress Resolution: NA Issue resolution is unavailable labels Apr 25, 2022
@Alvin1Zhang
Copy link
Collaborator

Thanks for your contribution, changes merged with 517c0b5.

@supcik supcik deleted the dev-led-stripe branch May 16, 2022 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Sync-Merge Pull request sync as merge commit Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants