cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F2xx_HAL_Driver : error in the driver TIM with DMA usage

st239955_stm1
Associate II
Posted on March 25, 2016 at 12:18

Hi,

I use a CubeMx V1.0, version 4.14.0.

Firmware Package SMT32F2 family, V1.3.0 / 20-November-2015.

There is an error in the file stm32fxx_hal_tim.c, in HAL_TIM_IC_Start_DMA function.

The problem is the beginning of the code, with the handling of the return state.

  if((htim->State == HAL_TIM_STATE_BUSY))

 

  {

 

     return HAL_BUSY;

 

  }

 

  else if((htim->State == HAL_TIM_STATE_READY))

 

  {

 

    if((pData == 0 ) && (Length > 0))

 

    {

 

      return HAL_ERROR;

 

    }

 

    else

 

    {

 

      htim->State = HAL_TIM_STATE_BUSY;

 

    }

 

  }

In my application, I use 4 channels of the same TIM with DMA requests.

If we start a DMA with one channel of TIMx, it is impossible to start another DMA  channel of

this same TIMx, because the HAL returns always BUSY.

Can the ST team update this driver ? Since it's a part of the drivers used by CubeMx, it's a very annoying problem.

Thanks 🙂

#stcubemx #tim #stm32 #dma #hal
1 REPLY 1
Walid FTITI_O
Senior II
Posted on March 25, 2016 at 17:47

Hi Stivy,

Thanks for your feedback. I will check this internally and come back to you.

-Hannibal-