2020-07-13 10:00 AM
Hello I'm using the STM32F767ZI part.
I have the following DMA initialized this way:
// TIM1 CC2 event
dmaCC2.Init.Direction = DMA_MEMORY_TO_PERIPH;
dmaCC2.Init.PeriphInc = DMA_PINC_DISABLE;
dmaCC2.Init.MemInc = DMA_MINC_DISABLE;
dmaCC2.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD;
dmaCC2.Init.MemDataAlignment = DMA_MDATAALIGN_WORD;
dmaCC2.Init.Mode = DMA_CIRCULAR;
dmaCC2.Init.Priority = DMA_PRIORITY_VERY_HIGH;
dmaCC2.Init.Channel = DMA_CHANNEL_6;
dmaCC2.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
dmaCC2.Init.FIFOThreshold = DMA_FIFO_THRESHOLD_FULL;
dmaCC2.Init.MemBurst = DMA_MBURST_SINGLE;
dmaCC2.Init.PeriphBurst = DMA_PBURST_SINGLE;
dmaCC2.Instance = DMA2_Stream2;
dmaCC2.XferCpltCallback = DMA_TransferCompleteHandler;
dmaCC2.XferHalfCpltCallback = DMA_TransferHalfHandler;
dmaCC2.XferErrorCallback = DMA_TransferError;
HAL_DMA_DeInit(&dmaCC2);
HAL_DMA_Init(&dmaCC2);
HAL_NVIC_SetPriority(DMA2_Stream2_IRQn, 2, 0);
HAL_NVIC_EnableIRQ(DMA2_Stream2_IRQn);
HAL_DMA_Start_IT(&dmaCC2, (uint32_t)WS2812_IO_Low, (uint32_t)&WS2812B_PORT->BSRR, BUFFER_SIZE);
Thanks!
Solved! Go to Solution.
2020-07-13 10:48 AM
Nevermind. The Deinit at the end was messing up everything. Thanks
2020-07-13 10:48 AM
Nevermind. The Deinit at the end was messing up everything. Thanks