AnsweredAssumed Answered

stm32f103xg.h  IS_TIM_SLAVE_INSTANCE()  bug???

Question asked by p.denis.001 on Mar 6, 2018

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 here



// configurations





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