2016-01-16 11:39 AM
I have a timer (Timer1) free running.
I have assigned two input captures.when I run this code: HAL_TIM_IC_Start_DMA(&htim1,TIM_CHANNEL_1,&buffer1,20); HAL_TIM_IC_Start_DMA(&htim1,TIM_CHANNEL_2,&buffer2,20);only ''buffer1'' gets updated and ''buffer2'' remains all zerosif I changed the order of the two lines only ''buffer2'' gets updated.does it mean I cannot assign two DMA for the same counter?2016-01-16 01:01 PM
You'd need to review the Reference Manual for the specific chip in question, but my understanding of the functionality is that you should be able to use two different DMA.
I suspect this is a software limitation, it would take some time/resources to prove that.2016-01-16 10:20 PM
I am using STM32f407 on Discovery board.
I have checked the HAL driver, it seems like it supports/configures the different DMA interrupts/requests for different channels!but the still it does not work!2016-01-17 11:50 AM
What is the content of TIM1_DIER in those two cases?
One step back: to which channel/stream did you set the two DMAs? JW2016-01-18 11:08 AM
I am using TIMER1
channel 1 (DMA2 stream 1)and channel 2 DMA2 stream 2)2016-01-18 11:42 AM
I am using TIMER1 channel 1 (DMA2 stream 1) and channel 2 DMA2 stream 2)
TIM1_CH1 -> DMA2 Stream 1 Channel 6TIM1_CH2 -> DMA2 Stream 2 Channel 62016-01-18 01:41 PM
Well, post the content of relevant registers of TIM1 (DIER, CCMR1, CCER) and DMA registers (registers of those two streams, plus the status register), then.
JW