2018-04-03 01:46 AM
Using:
Truestudio for STM32 v9.0.0.0
STM32CubeMX v4.25.0
STM32F100C8
LL_drivers only
LL_Code generated by cube enables some devices, such as the USART:
LL_USART_Enable(USART1);
But for the TIMERS it doesn't.
(perhaps there is a good reason for this?)
Also, when you select a PWM output, it does not enable the output(s):
TIM_OC_InitStruct.OCMode = LL_TIM_OCMODE_PWM1;
TIM_OC_InitStruct.OCState = LL_TIM_OCSTATE_DISABLE;Again, why?
(Leaving a hint in int main(void) might be an idea.)
For advanced TIMERS (TIM1) it may help people who want to use PWM when this is mentioned somewhere:
LL_TIM_EnableAllOutputs(TIM1);
(I found the MOE_bit to be rather hidden in the documentation in TIMx_BDTR)
Regards,
Wilko
Solved! Go to Solution.
2018-05-09 09:29 AM
Hi Mohamed,
Thanks, I understand. Should I do something to close this case?
And may I ask you to look at another question from me? It has the title '
https://community.st.com/0D50X00009XkYRlSAN
'Regards,
Wilko
2019-06-18 11:49 PM
Run into the same problem with stm32f100rbt!
Configure OC output pin for TIM3 in CubeMX and then get the generated
"TIM_OC_InitStruct.OCState = LL_TIM_OCSTATE_DISABLE"
in the code.
What the developer tries to avoid?
The timer isn't been started in the configuration code.
Thinking this way all output pins should be disabled during configuration!
I spent 2 days trying to find whats wrong!