2018-05-25 02:27 AM
Hello, I'd like to know if there is possibility to use all input capture channels at the same time?
For starting timer i use function wich enable only 1 channel:
HAL_TIM_IC_Start_DMA(&htim1, TIM_CHANNEL_1, &restWave[0], 1);
I'd like to use something like this (but obviously it doesn't work)
HAL_TIM_IC_Start_DMA(&htim1, TIM_CHANNEL_ALL, restWave, 4);
And it doesn't work as well:
HAL_TIM_IC_Start_DMA(&htim1, TIM_CHANNEL_1, &restWave[0], 1);
HAL_TIM_IC_Start_DMA(&htim1, TIM_CHANNEL_2, &restWave[1], 1);
HAL_TIM_IC_Start_DMA(&htim1, TIM_CHANNEL_3, &restWave[2], 1);
HAL_TIM_IC_Start_DMA(&htim1, TIM_CHANNEL_4, &restWave[3], 1);
2018-05-25 03:02 AM
Hi
steca
,Could you precise which STM32 device you're using.
Khouloud.
2018-05-25 05:04 AM
STM32F303
2018-06-04 07:30 AM
Hi
,HAL_TIM_IC_Start_DMA(&htim1, TIM_CHANNEL_ALL, restWave, 4);�?
2. Try to force the state toHAL_TIM_STATE_READY after each function call:
HAL_TIM_IC_Start_DMA(&htim1, TIM_CHANNEL_1, &restWave[0], 1);htim1.State = HAL_TIM_STATE_READY;HAL_TIM_IC_Start_DMA(&htim1, TIM_CHANNEL_2, &restWave[1], 1);htim1.State = HAL_TIM_STATE_READY;HAL_TIM_IC_Start_DMA(&htim1, TIM_CHANNEL_3, &restWave[2], 1);htim1.State = HAL_TIM_STATE_READY;HAL_TIM_IC_Start_DMA(&htim1, TIM_CHANNEL_4, &restWave[3], 1);htim1.State = HAL_TIM_STATE_READY;�?�?�?�?�?�?�?�?
I'm waiting for your feedback
Khouloud.
2018-06-04 09:00 AM
'
if there is possibility to use all input capture channels at the same time?'
Yes assuming that pin configuration isn't a challenge.
2018-06-11 08:53 AM
It seems to work
Thank you Khouloud very much for your time
2018-06-11 09:00 AM
You're welcome
2018-06-11 03:15 PM
khouloud,
This is pretty interesting!
But i have trouble understanding what timer state not ready means, if i am allow to override it so i can start something else that checks it! \
When am i supposed to assume it is busy means busy and when am i allow to ignore/override it?
Maybe you flush out the details here and are there another cases where this is applicable?