cancel
Showing results for 
Search instead for 
Did you mean: 

HAL_TIM_Base_Start_DMA - STM32CubeMX

matteo239955_st
Associate II
Posted on September 14, 2016 at 12:27

I've try to use HAL_TIM_Base_Start_DMA with TIM6.

To configure the system I'm using STM32CubeMX. We I start the project I can't receive any interrupt...

HELP.

In Attachment the ioc file.

My change after code generation:

In red tim.c file modify:

#include ''tim.h''

#include ''dma.h''

/* USER CODE BEGIN 0 */

uint32_t aCCValue_Buffer[3] = {10000, 1000, 100};

/* USER CODE END 0 */

...

    /* Peripheral interrupt init */

    HAL_NVIC_SetPriority(TIM6_IRQn, 0, 0);

    HAL_NVIC_EnableIRQ(TIM6_IRQn);

  /* USER CODE BEGIN TIM6_MspInit 1 */

HAL_TIM_Base_Start_DMA(tim_baseHandle, aCCValue_Buffer, 3);

  /* USER CODE END TIM6_MspInit 1 */

....

/* USER CODE BEGIN 1 */

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) {

HAL_GPIO_TogglePin(LD2_GPIO_Port, LD2_Pin);

}

/* USER CODE END 1 */

4 REPLIES 4
carmine
Associate II
Posted on September 14, 2016 at 17:11

Too few information here. How do you configure the timer? Do you enable the DMA? Do you implement the DMA interrupt? What about the DMA configuration?

Post the whole project.

Fadi.Albaghdadi
Associate III

dıd npt work wıth me