2018-03-06 01:33 AM
According to RM008 DocID13902 Rev 17 page 447/1133 TIM9 supports 'External clock mode 1'
TIM9/12 slave mode control register (TIMx_SMCR)
Bits 6:4 TS: Trigger selection This bit field selects the trigger input to be used to synchronize the counter.
...
101: Filtered Timer Input 1 (TI1FP1)
110: Filtered Timer Input 2 (TI2FP2)
...Bits 2:0 SMS: Slave mode selection When external signals are selected, the active edge of the trigger signal (TRGI) is linked to the polarity selected on the external input (see Input control register and Control register descriptions.
...
111: External clock mode 1 - Rising edges of the selected trigger (TRGI) clock the counter
...
But I received 'assert failed'
while trying to configure TIM9 in 'External clock mode 1'.
HAL_StatusTypeDef HAL_TIM_SlaveConfigSynchronization(TIM_HandleTypeDef *htim, TIM_SlaveConfigTypeDef * sSlaveConfig)
{ /* Check the parameters */ assert_param(IS_TIM_SLAVE_INSTANCE(htim->Instance)); // <- assert failed hereassert_param(IS_TIM_SLAVE_MODE(sSlaveConfig->SlaveMode));
assert_param(IS_TIM_TRIGGER_SELECTION(sSlaveConfig->InputTrigger));// configurations
}
stm32f103rft
STM32CubeF1 Firmware Package V1.6.0 / 17-May-2017
stm32f1xx_hal_tim.h version V1.1.1
stm32f103xg.h version V4.2.0
Supposing TIM9 is missing in IS_TIM_SLAVE_INSTANCE() definition
2019-04-16 04:19 AM
Hello,
This issue will be fixed in the coming release STM32CubeF1 V1.8.0
Regards,
Imen