AnsweredAssumed Answered

HAL geniuses, how does this work?

Question asked by Clive One on Jun 16, 2017
Latest reply on Jun 23, 2017 by Amel N

From the STM32F412G-DISCO demo

 

uint32_t HAL_GetTick(void)
{
return (DWT->CYCCNT / (HAL_RCC_GetHCLKFreq() / 1000)) ;
}

 

How exactly does this wrap properly within the 32-bit number space? Answer: IT DOESN'T

Outcomes