本文整理汇总了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);
}
示例2: QMV_Init
/*====================================================================================================*/
void QMV_Init( void )
{
HAL_InitTick();
QMV_GPIO_Config();
QMV_LCD_Config();
}
示例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
}
示例4: main
/*====================================================================================================*/
int main( void )
{
HAL_InitTick();
KDWM_Init();
KDWM_Loop();
}
示例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;
}
示例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;
}
示例7: IMUCube_Init
/*====================================================================================================*/
void IMUCube_Init( void )
{
SystemInit();
HAL_InitTick();
WS2812B_Config();
}
示例8: main
/*====================================================================================================*/
int main( void )
{
SystemInit();
HAL_InitTick();
KDWM_Init();
KDWM_Loop();
}
示例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
}
示例10: BSY_Init
void BSY_Init( void )
{
SystemInit();
HAL_InitTick();
BSY_GPIO_Config();
BSY_UART_Config(UART_RecvEven);
}
示例11: BSM_Init
/*=====================================================================================================*/
void BSM_Init( void )
{
SystemInit();
HAL_InitTick();
BSM_GPIO_Config();
BSM_UART_Config(NULL);
BSM_MPU9250_Config();
}
示例12: KDWM_Init
/*====================================================================================================*/
void KDWM_Init( void )
{
SystemInit();
HAL_InitTick();
KDWM_GPIO_Config();
KDWM_ADC1_Config();
KDWM_UART1_Config(NULL);
}
示例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);
}
示例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;
}
示例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;
}