Add cycle counter time conversion macros
Add cycle counter time conversion macros
Sometimes we need to use the chPolledDelayX to implement a specific time delay. Since this implements a delay in units of cycles, we need to know what the frequency of the cycle counter is. That differs from device to device. I'm thinking there should be a macro like RT_CNT_FREQ in hal_lld.h (or wherever appropriate) that selects the correct value for it. In the STM32L4xx, that would be STM32_SYSCLK. But on the STM32F7xx, it is the STM32_HCLK ... Other processors would be different as well .
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times