Size of buffer, used by DMA
Hello there!
I want to create a library to maintain work of led-strip based on SK6812
The fastest way to make it work (according to some resources:
https://geektimes.ru/post/255548/
(Russian)) is to use PWM timer with DMA.So, currently, I'm trying to start properly work of led on stm32f4discovery in the following way:
- I used timer TIM4 with PWM on channel 1 (PD12 pin)

- I configured DMA by next way

- I created buffer with data to compare in timer and transmitted it to properly register
int k = 125;
uint32_t buf[k];uint16_t i;for(uint16_t i =0; i<k; i++){buf[i] = i*3;
}
HAL_TIM_PWM_Start_DMA(&htim4, TIM_CHANNEL_1, (uint32_t *)buf, sizeof(buf));There are some problems, but PWM lighting exists.
The main problem is that I can't use a buffer with a size bigger than 125. When I try to use bigger buffer led didn't work.
Is there any fundamental error I don't see? I tried to use other settings in DMA and Timer, but nothing changed.
Thank you for answers!
#timer #stm32f4 #cube #keil #pwm #dma #buffer #stm32f4discovery