cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube - BUG report : DeadTime is missing while configuring advanced TIM8.

st239955_stm1
Associate II
Posted on July 11, 2014 at 10:34

Hi,

I'm using STM32CubeMX for a STM32F205 MCU.

There is a problem with the use of the TIM8 configuration, regarding BDTR config register.

The DeadTime does not appear in the config of TIM8. And then, its code is not generated either. 

The problem is that in the libraries, sBreakDeadTimeConfig.Deadtime is not initialised ; and then it contains a random value at reset. 

Since the initialisation of the register is made like this : 

  htim->Instance->BDTR = (uint32_t)sBreakDeadTimeConfig->OffStateRunMode  | 

 

                                   sBreakDeadTimeConfig->OffStateIDLEMode |

 

                                   sBreakDeadTimeConfig->LockLevel        |

 

                                   sBreakDeadTimeConfig->DeadTime         |

 

                                   sBreakDeadTimeConfig->BreakState       |

 

                                   sBreakDeadTimeConfig->BreakPolarity    |

 

                                   sBreakDeadTimeConfig->AutomaticOutput;

You can understand that after initialisation, the whole BDTR register is randomly filled.. and the the TIM output can give you very weird behaviours when you are not aware of this problem. 

I don't know if we have the same problem with TIM1, it should be check too.

Can the ST team : 

 - confirm that it is a bug ?

 - let us know when it will be fixed ?

 - let us know when is planned the next update ? 

Thanks,

#stm32f2 #!bug #timers #cubemx
3 REPLIES 3
stm32cube-t
Senior III
Posted on July 21, 2014 at 17:18

Can you please provide the .ioc file so that we reproduce your issue.

Thank you.

stm32cube-t
Senior III
Posted on July 28, 2014 at 18:26

Hello,

We confirm this is an issue. Thank you for reporting it. This will be fixed in the next release.

As a temporary workaround users can complete the timer initialization function 'MX_TIM8_Init' with:

sBreakDeadTimeConfig.DeadTime = 0;

Unfortunately this code update will be lost at next code generation with MX since it is not part of a user section.

Best Regards

st239955_stm1
Associate II
Posted on March 25, 2016 at 11:08

Hi,

Indeed, it is ok now. 

We can close this bu and mark this topic as solved :)

Thanks.