当前位置: 首页>>代码示例>>C++>>正文


C++ HAL_InitTick函数代码示例

本文整理汇总了C++中HAL_InitTick函数的典型用法代码示例。如果您正苦于以下问题:C++ HAL_InitTick函数的具体用法?C++ HAL_InitTick怎么用?C++ HAL_InitTick使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了HAL_InitTick函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: deepsleep

void deepsleep(void) {
    // Request to enter STOP mode with regulator in low power mode
    HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);

	  HAL_InitTick(TICK_INT_PRIORITY);
	
    // After wake-up from STOP reconfigure the PLL
    SetSysClock();
	
	  HAL_InitTick(TICK_INT_PRIORITY);
}
开发者ID:AsamQi,项目名称:mbed,代码行数:11,代码来源:sleep.c

示例2: QMV_Init

/*====================================================================================================*/
void QMV_Init( void )
{
  HAL_InitTick();

  QMV_GPIO_Config();
  QMV_LCD_Config();
}
开发者ID:QCopter,项目名称:QCopterMachineVision,代码行数:8,代码来源:qCopterMV.c

示例3: us_ticker_init

void us_ticker_init(void)
{
    if (us_ticker_inited) return;
    us_ticker_inited = 1;

    HAL_InitTick(0); // The passed value is not used
}
开发者ID:nickmolo,项目名称:ECE477,代码行数:7,代码来源:us_ticker.c

示例4: main

/*====================================================================================================*/
int main( void )
{
  HAL_InitTick();

  KDWM_Init();
  KDWM_Loop();
}
开发者ID:KitSprout,项目名称:KDWM1000,代码行数:8,代码来源:main.c

示例5: HAL_Init

/**
  * @brief This function configures the Flash prefetch, 
  *        Configures time base source, NVIC and Low level hardware
  * @note This function is called at the beginning of program after reset and before 
  *       the clock configuration
  * @note The time base configuration is based on MSI clock when exiting from Reset.
  *       Once done, time base tick start incrementing.
  *        In the default implementation,Systick is used as source of time base.
  *       The tick variable is incremented each 1ms in its ISR.
  * @retval HAL status
  */
HAL_StatusTypeDef HAL_Init(void)
{
  /* Configure Flash prefetch */
#if (PREFETCH_ENABLE != 0)
#if defined(STM32F101x6) || defined(STM32F101xB) || defined(STM32F101xE) || defined(STM32F101xG) || \
    defined(STM32F102x6) || defined(STM32F102xB) || \
    defined(STM32F103x6) || defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG) || \
    defined(STM32F105xC) || defined(STM32F107xC)

  /* Prefetch buffer is not available on value line devices */
  __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
#endif
#endif /* PREFETCH_ENABLE */

  /* Set Interrupt Group Priority */
  HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);

  /* Use systick as time base source and configure 1ms tick (default clock after Reset is MSI) */
  HAL_InitTick(TICK_INT_PRIORITY);

  /* Init the low level hardware */
  HAL_MspInit();

  /* Return function status */
  return HAL_OK;
}
开发者ID:CynaCons,项目名称:stm32_BluTechDevice,代码行数:37,代码来源:stm32f1xx_hal.c

示例6: HAL_Init

/**
  * @brief  This function is used to initialize the HAL Library; it must be the first 
  *         instruction to be executed in the main program (before to call any other
  *         HAL function), it performs the following:
  *           Configure the Flash prefetch, instruction and Data caches.
  *           Configures the SysTick to generate an interrupt each 1 millisecond,
  *           which is clocked by the HSI (at this stage, the clock is not yet
  *           configured and thus the system is running from the internal HSI at 16 MHz).
  *           Set NVIC Group Priority to 4.
  *           Calls the HAL_MspInit() callback function defined in user file 
  *           "stm32f4xx_hal_msp.c" to do the global low level hardware initialization 
  *            
  * @note   SysTick is used as time base for the HAL_Delay() function, the application
  *         need to ensure that the SysTick time base is always set to 1 millisecond
  *         to have correct HAL operation.
  * @param  None
  * @retval HAL status
  */
HAL_StatusTypeDef HAL_Init(void)
{
  /* Configure Flash prefetch, Instruction cache, Data cache */ 
#if (INSTRUCTION_CACHE_ENABLE != 0)
   __HAL_FLASH_INSTRUCTION_CACHE_ENABLE();
#endif /* INSTRUCTION_CACHE_ENABLE */

#if (DATA_CACHE_ENABLE != 0)
   __HAL_FLASH_DATA_CACHE_ENABLE();
#endif /* DATA_CACHE_ENABLE */

#if (PREFETCH_ENABLE != 0)
  __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
#endif /* PREFETCH_ENABLE */

  /* Set Interrupt Group Priority */
  HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);

  /* Use systick as time base source and configure 1ms tick (default clock after Reset is HSI) */
  HAL_InitTick(TICK_INT_PRIORITY);
  
  /* Init the low level hardware */
  HAL_MspInit();
  
  /* Return function status */
  return HAL_OK;
}
开发者ID:actnova,项目名称:maradona,代码行数:45,代码来源:stm32f4xx_hal.c

示例7: IMUCube_Init

/*====================================================================================================*/
void IMUCube_Init( void )
{
  SystemInit();
  HAL_InitTick();

  WS2812B_Config();
}
开发者ID:k1132,项目名称:IMUCube,代码行数:8,代码来源:imuCube.c

示例8: main

/*====================================================================================================*/
int main( void )
{
  SystemInit();
  HAL_InitTick();

  KDWM_Init();
  KDWM_Loop();
}
开发者ID:KitSprout,项目名称:KDWM1000,代码行数:9,代码来源:main.c

示例9: us_ticker_init

void us_ticker_init(void) {
    if (us_ticker_inited) return;
    us_ticker_inited = 1;

    TimMasterHandle.Instance = TIM_MST;

    HAL_InitTick(0); // The passed value is not used  
}
开发者ID:mbrudevoldlpd,项目名称:mbed_rtx_issue,代码行数:8,代码来源:us_ticker.c

示例10: BSY_Init

void BSY_Init( void )
{
    SystemInit();
    HAL_InitTick();

    BSY_GPIO_Config();
    BSY_UART_Config(UART_RecvEven);
}
开发者ID:KitSprout,项目名称:YellowBeanSprout,代码行数:8,代码来源:beanSproutY.c

示例11: BSM_Init

/*=====================================================================================================*/
void BSM_Init( void )
{
  SystemInit();
  HAL_InitTick();

  BSM_GPIO_Config();
  BSM_UART_Config(NULL);
  BSM_MPU9250_Config();
}
开发者ID:dongruibin,项目名称:MungBeanSprout,代码行数:10,代码来源:beanSproutM.c

示例12: KDWM_Init

/*====================================================================================================*/
void KDWM_Init( void )
{
  SystemInit();
  HAL_InitTick();

  KDWM_GPIO_Config();
  KDWM_ADC1_Config();
  KDWM_UART1_Config(NULL);
}
开发者ID:KitSprout,项目名称:KDWM1000,代码行数:10,代码来源:kdwm1000.c

示例13: KDWM_Init

void KDWM_Init( void )
{
  SystemInit();
  HAL_InitTick();

  KDWM_GPIO_Config();
  KDWM_TIM2_Config(LED_B_BLINK);
  KDWM_TIM3_Config(LED_G_BLINK);
}
开发者ID:KitSprout,项目名称:KDWM1000,代码行数:9,代码来源:kdwm1000.c

示例14: HAL_SetTickFreq

/**
  * @brief Set new tick Freq.
  * @retval Status
  */
HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq)
{
  HAL_StatusTypeDef status  = HAL_OK;
  assert_param(IS_TICKFREQ(Freq));

  if (uwTickFreq != Freq)
  {
    uwTickFreq = Freq;

    /* Apply the new tick Freq  */
    status = HAL_InitTick(uwTickPrio);
  }

  return status;
}
开发者ID:sg-,项目名称:mbed-os,代码行数:19,代码来源:stm32f7xx_hal.c

示例15: HAL_Init

/**
  * @brief  This function configures the Flash prefetch,
  *         Configures time base source, NVIC and Low level hardware
  *
  * @note   This function is called at the beginning of program after reset and before
  *         the clock configuration
  *
  * @note   The Systick configuration is based on HSI clock, as HSI is the clock
  *         used after a system Reset and the NVIC configuration is set to Priority group 4
  *
  * @note   The time base configuration is based on MSI clock when exting from Reset.
  *         Once done, time base tick start incrementing.
  *         In the default implementation,Systick is used as source of time base.
  *         the tick variable is incremented each 1ms in its ISR.
  *
  * @note
  * @retval HAL status
  */
HAL_StatusTypeDef HAL_Init(void)
{
    /* Configure Flash prefetch */
#if (PREFETCH_ENABLE != 0)
    __HAL_FLASH_PREFETCH_BUFFER_ENABLE();
#endif /* PREFETCH_ENABLE */

    /* Set Interrupt Group Priority */
    HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_4);

    /* Enable systick and configure 1ms tick (default clock after Reset is HSI) */
    HAL_InitTick(TICK_INT_PRIORITY);

    /* Init the low level hardware */
    HAL_MspInit();

    /* Return function status */
    return HAL_OK;
}
开发者ID:ramonnr,项目名称:STM32F303-watchdog-demo,代码行数:37,代码来源:stm32f3xx_hal.c


注:本文中的HAL_InitTick函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。