Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
ESP32 corrupted data within rmt device #719
The problem is a color flickering starting from one (random) LED in the stripe and affecting all following ones appearing about once or twice a second.
First I thought that the problem is due to interruptions by the WiFi or Bluetooth communication but nothing so I tried the following:
Nothing helped. So I tried to diagnose the problem by only sending static data to the LEDS and connecting an Oscilloscope to the data channel so every frame should look the same:
So somehow there get 16 byte inserted into the bitstream after byte index 7 this not only destroys the one pixel but shifts the whole stream and creates wrong colors.
I also tried to replace the rmt code of esp by a very simplified code which causes the same issues.
I am out of ideas how to solve this.I hope anyone here can help me?
The drive url you gave doesn’t work.
Also while it appears to be either an extra 16 bits was inserted - alternatively, it could be a byte was dropped - you’re sending the same 3 bytes repeatedly, so both things happening would look the same.
@samguyer - thoughts?
Ok - I think what might be happening is the interrupt to refill the rmt buffer may be getting handled too late - causing a chunk of data to get written out again. @samguyer - do you know why the rmt builtin driver was crashing? Also the rest of the code appears to assume that the interrupt will be handled and doesn’t appear to have any checks to verify that it was.
I changed the code of the clockless_esp32.h to use SPI for the signal generation:
This solves the problem for me. But I still think, that there is a bug inside the RMT code somewhere