Problem with TIM3 Input capture with DMA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-29 10:31 AM
Hello everybody,
I am trying to use the TIM3 those input capture mode with DMA transfer. After buffer is full the DMA call the callback function IT. Then i execute the stop DMA function. But after this sequence, the DMA no reinitialize. I am using the Cube MX for initialize the code.
What could I be doing wrong?
I am using the STM32C011F6P6
The code:
uint16_t period_buffer[52];
HAL_TIM_IC_Start_DMA(&htim3, TIM_CHANNEL_1, (uint32_t*) period_buffer, 52);
void HAL_TIM_IC_CaptureCallback(TIM_HandleTypeDef *htim)
{
HAL_TIM_IC_Stop_DMA(&htim3, TIM_CHANNEL_1);
}
Solved! Go to Solution.
- Labels:
-
STM32CubeMX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-03 10:03 AM
I'm operating in normal mode, I had to include one more command to solve the problem:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-30 4:22 AM
Hello @VSchu.1,
Please share your DMA configuration
I suppose you're configuring DMA in circular mode, if you're using normal mode you need to reinitialize the DMA transfer manually in the callback function.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-30 4:46 AM
Hello @VSchu.1
In order to reproduce the possible issue, could you please provide more details on your setting project if possible, attach your .ioc file/configuration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-05-30 4:53 AM
> But after this sequence, the DMA no reinitialize.
What does this mean?
What are the symptoms, and how are they different from the expected behaviour?
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-06-03 10:03 AM
I'm operating in normal mode, I had to include one more command to solve the problem:
