-
Notifications
You must be signed in to change notification settings - Fork 24
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
ws2812 with GPIO doesn't work #7
Comments
Can you run ws2812 demo (edit to use GPIO)? |
Sorry I didn’t get what you mean.I can run demo using Spi. I tried to use Gpio but didn’t work ( while it works on Standalone Sdk ) |
GPIO not always work well, it's timing not accurate. I think you can try to use i2s. On some custom board (other than KD233), spi chip select may also can solve free port problem. |
@GongT I've already tried i2s, but it doesn't work too since there is only one function to send data stream to the i2s port " i2s_configure_as_render" and it repeatedly send the last frame of data to the i2s port, I tried to use i2s_stop function but then if you try to start i2s again it crashes. I posted the issue with i2s but nobody has responded yet! |
When FreeRTOS I2S open, it will use DMA to transmit data. The stop interface does not stop DMA transmission. This i2s driver is only designed for audio. To control ws2812, user programs need to fill data in the buffer by i2s_get_buffer and i2s_release_buffer continuously.DMA will transmit data continuously.You can show me your test code. |
@xiangbingj Thanks for your reply. uint32_t blue_color[] = { void init_i2s(void) void send_data(size_t total_frames,const uint8_t *ptr) uint8_t *buffer = NULL; while (reset_frames)
} } int main(void)
// uint32_t null_size=219;
uint8_t i=0;
// if (null_size)
} |
Hi all,
I need to use bit-banging instead of SPI for ws2812 since I don't have free SPI port, I noticed that it's already implemented for Standalone-sdk , I made required changes to be able to use that in FreedRtos-sdk but unfortunately it doesn't work. Puls width is 5us instead of 900ns (both low and high level time are about 2.6us instead while it should be around 300/600 ns.
The text was updated successfully, but these errors were encountered: