Skip to main content
denisb-popov
Associate II
March 6, 2018
Question

stm32f103xg.h IS_TIM_SLAVE_INSTANCE() bug???

  • March 6, 2018
  • 1 reply
  • 848 views
Posted on March 06, 2018 at 10:33

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

assert_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

This topic has been closed for replies.

1 reply

ST Technical Moderator
April 16, 2019

Hello,

This issue will be fixed in the coming release STM32CubeF1 V1.8.0

Regards,

Imen

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks