Timer + DMA problem
I am using TIM+DMA, and the main problem is that the first value should be loaded into ARR before the timer starts, but it is not. Also, regarding length, if it should be set in bytes, it should be clearly documented in a comment for that function, which currently it is not.
uint32_t val_tim[] = {1500, 1200, 2000, 3000, 4000, 5000};
HAL_TIM_Base_Start_DMA(&htim2, val_tim, 6 * 4);
