Monthly Archives: October 2021

STM32duino Clock Frequency

  • #define F_CPU SystemCoreClock
  • WEAK void SystemClock_Config(void)
  • uint32_t HAL_RCC_GetSysClockFreq(void)
  • uint32_t HAL_RCC_GetHCLKFreq(void)
  • HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
  • HAL_RCC_GetClockConfig

HAL_InitTick()

/* using SysTick */
__weak HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
  [...]
}
/* using TIM6 */
HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority)
{
  [...]
}

[...]

void TIM6_DAC_IRQHandler(void)
{
  HAL_TIM_IRQHandler(&TimHandle);
}
__weak void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)