Page 287 - MDP2022-2
P. 287

Error_Handler();
                      }
                  }


                  /**
                      *  @brief  TIM3  Initialization  Function
                      *  @param  None
                      *  @retval  None
                      */
                  static  void  MX_TIM3_Init(void)
                  {


                      /*  USER  CODE  BEGIN  TIM3_Init  0  */


                      /*  USER  CODE  END  TIM3_Init  0  */


                      TIM_ClockConfigTypeDef  sClockSourceConfig  =  {0};
                      TIM_MasterConfigTypeDef  sMasterConfig  =  {0};
                      TIM_IC_InitTypeDef  sConfigIC  =  {0};


                      /*  USER  CODE  BEGIN  TIM3_Init  1  */


                      /*  USER  CODE  END  TIM3_Init  1  */
                      htim3.Instance  =  TIM3;
                      htim3.Init.Prescaler  =  90-1;
                      htim3.Init.CounterMode  =  TIM_COUNTERMODE_UP;
                      htim3.Init.Period  =  0xFFFF-1;
                      htim3.Init.ClockDivision  =  TIM_CLOCKDIVISION_DIV1;
                      htim3.Init.AutoReloadPreload  =  TIM_AUTORELOAD_PRELOAD_DISABLE;
                      if  (HAL_TIM_Base_Init(&htim3)  !=  HAL_OK)
                      {
                          Error_Handler();
                      }
                      sClockSourceConfig.ClockSource  =  TIM_CLOCKSOURCE_INTERNAL;
                      if  (HAL_TIM_ConfigClockSource(&htim3,  &sClockSourceConfig)  !=  HAL_OK)
                      {
                          Error_Handler();
                      }
                      if  (HAL_TIM_IC_Init(&htim3)  !=  HAL_OK)
                      {
                          Error_Handler();
   282   283   284   285   286   287   288   289   290   291   292