Convert DWT cycle count to time using STM32 and HAL
问题 I am developing on STM32F302R8 in FreeRTOS. I am using the following DWT code from here to profile execution time. My DWT cycle count seems to be working, but I am unsure how to convert it into seconds. From what I gathered online, it seems like the cycle count is based on the CPU frequency. Which HAL function will return the correct CPU frequency for me? I am thinking that it's one of the following uint32_t HAL_RCC_GetSysClockFreq(void); uint32_t HAL_RCC_GetHCLKFreq(void); uint32_t HAL_RCC