2018-10-29 11:51 AM
I am trying to create PWM signal using DMA channel using circular buffer. TIM2, channel1, DMA1_channel5.
I have created the configuration using CubeMX. Then I have investigated the HAL_DMA_IRQHandler() procedure called by DMA1_Channel5_IRQHandler().
If I register FULL BUFFER callback using HAL_DMA_RegisterCallback(&hdma_tim2_ch1, HAL_DMA_XFER_CPLT_CB_ID, <some CB>), it overwrites with system TIM-blah-blah callback and my callback never fires!
If HAL_DMA_RegisterCallback(&hdma_tim2_ch1, HAL_DMA_XFER_HALFCPLT_CB_ID, <some CB>) does not called prior HAL_TIM_PWM_Start_DMA(&htim2, TIM_CHANNEL_1, (uint32_t *)data, LEN),
NO HALF BUFFER interrupts fires at all. I mean the corresponding section in the HAL_DMA_IRQHandler() does not work.
How can i make sure my routines be fired when half buffer and full buffer transfer complete?