I am trying to bit bang neopixel protocol. I tried both GPIO and port examples in SDK. But the time it takes to toggle the GPIO is quite high. Around
How can i make if fast. I tried changing the CPU clock. But it did not change anything.
if (wifi_config.wifi_ultra_low_power &&
wifi_config.wifi_app_ctrl_tdma == FALSE) {
SystemSetCpuClk(CLK_KM4_200M);
}
Hi, it’s just confirmed with internal team that it is true that toggling from high to low or low to high takes at least 1.5us, so driving neopixel with GPIO might not be a viable option for RTL872XD chips at the moment.
However, you may consider other LED model(such as this) for neopixel which uses SPI protocol which is more robust and faster.
Several tests have been carried out by directly setting the GPIO related registers but the test results stay the same. it’s currently unclear if it’s a hardware limitation or software issue
okay.
thanks for the update.
I managed to get the SPI MOSI pinto to generate the required waveform for neo pixels.
But knowing the actual reason for the limitation will be good.
Glad to hear that! Would you mind sharing this part of your code for the community? someone on this forum is also asking about neopixel and would be very interested in your solution
We will keep you posted once we hear more from the internal RD team.
Sure. The code implements the low-level function of translating neo pixel byte stream to SPI output.
I am working with this particular IC. Timings for different ICs might differ slighly.
The function accepts a buffer that contains actual RGB values. Each LED needs 3 bytes.
Hope this is helpful. Change the extension to .c main.xml (4.9 KB)
Hey @xidameng
It had been almost one year for this topic. I want to know if there any conclusion here?
we recently also faced the low sppeed IO toggle issue for RTL8722. Just curious if there is any way to increase the IO toggle speed?
Thanks for your question. Sorry to inform you that actually, @xidameng is no longer with the team.
To answer your question really quickly, there is no way to toggle the GPIO frequency to be faster.
And due to the speed limitation, AmebaD Neo Pixel was connected to the SPI MOSI pin to obtain a faster refreshing rate.