AnsweredAssumed Answered

TIM2, assert_failed and MX

Question asked by Barta.Hank on Sep 14, 2015
Latest reply on Sep 18, 2015 by Barta.Hank
Monday mornings don;t usually bother me but today seems different. I have commented out some code in gpio.c (for an input that is not presently used) and now I get run time assertions in timer configuration. The line that asserts is:
And sure enough, the value of that field looks like garbage and the MX generated code that calls HAL_TIM_ConfigClockSource() does not set this field.

I have two questions about this. Why is this assert failing now? I not generated code using MX since late August.

How can I figure out what a timer is used for int the first place? This is TIM2 on an STM32F429I and was not explicitly configured in the first place. I suppose it is used for some other chip peripheral but I cannot see a way to determine what.

I tried commenting out the call to MX_TIM2_Init() in main.c to see what no longer works and I find that the next timer init (MX_TIM8_Init()) now fails on the same assertion.

Looking at the timer configuration dialogs it is not even obvious what the polarity be. 

I'm baffled about how to resolve this so I can get back to work.