2019-01-09 06:23 AM
Generated code is the following:
void MX_TIM6_Init(void)
{
LL_TIM_InitTypeDef TIM_InitStruct = {0};
/* Peripheral clock enable */
LL_APB1_GRP1_EnableClock(LL_APB1_GRP1_PERIPH_TIM6);
/* TIM6 interrupt Init */
NVIC_SetPriority(TIM6_DAC_IRQn, NVIC_EncodePriority(NVIC_GetPriorityGrouping(),5, 0));
NVIC_EnableIRQ(TIM6_DAC_IRQn);
TIM_InitStruct.Prescaler = 48000;
TIM_InitStruct.CounterMode = LL_TIM_COUNTERMODE_UP;
TIM_InitStruct.Autoreload = LL_TIM_IC_FILTER_F IVLL_TIM_IC_FILTER_FDIV1_N26_N5-LL_TIM_IC_FILTER_FDIV1_N2;
LL_TIM_Init(TIM6, &TIM_InitStruct);
LL_TIM_DisableARRPreload(TIM6);
LL_TIM_SetTriggerOutput(TIM6, LL_TIM_TRGO_RESET);
LL_TIM_DisableMasterSlaveMode(TIM6);
}
and the error is here:
TIM_InitStruct.Autoreload = LL_TIM_IC_FILTER_FDIVLL_TIM_IC_FILTER_FDIV1_N26_N5-LL_TIM_IC_FILTER_FDIV1_N2;
..\Core\Src\tim.c:135:31: error: 'LL_TIM_IC_FILTER_FDIVLL_TIM_IC_FILTER_FDIV1_N26_N5' undeclared (first use in this function)
TIM_InitStruct.Autoreload = LL_TIM_IC_FILTER_FDIVLL_TIM_IC_FILTER_FDIV1_N26_N5-LL_TIM_IC_FILTER_FDIV1_N2;
2019-01-11 06:09 AM
Hello @kurta999 ,
Thanks for highlighting this issue, I raised it internally to our CubeMX team for fix.
Kind Regards,
Imen
2019-01-16 05:20 AM
Hello @kurta999 ,
Thanks for your feedback.
The value of counter period is 10-1 and this is incorrect value.
Period must have numeric value between 0 and 65 535.
Feel free to contact me for further details.
Regards,
Houda
2019-01-16 06:42 AM
Ahh.. Tomorrow I''ll try it with 9. But with HAL it worked correctly, then CubeMX should not allow entering complete expressions to period when using LL or create another workaround.
2019-01-21 11:31 PM
I've tried it with 9, it's still bugged.