2014-07-11 01:34 AM
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
2014-07-21 08:18 AM
Can you please provide the .ioc file so that we reproduce your issue.
Thank you.2014-07-28 09:26 AM
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 Regards2016-03-25 03:08 AM
Hi,
Indeed, it is ok now. We can close this bu and mark this topic as solved :)Thanks.