Martin Kuhn
Martin Kuhn
Yes, this is probably the same with all platforms using a 32 bits value. Actually, the implementation of `HAL_Time_ExtendedCurrentSysTicks` is only applicable for ChibiOS, because it uses the `chVTGetSystemTimeX()` function...
> It might be worth checking this has not changed in the latest chibios 21.6 release. I did see something around using 64 bit times when converting (but might well...
@josesimoes Ok! Another question: as the `CH_CFG_ST_FREQUENCY` is only used with 1kHz and 10kHz, there would be a much simpler implementation of the `HAL_Time_SysTicksToTime()` function. For 1kHz it's only `sysTicks...
I would suggest to replace the function HAL_Time_SysTicksToTime, which is pretty complicated with 2 multiplications and a one division, with the simpler implementation I mentioned before. I guess this would...
actually, it's not that simple. We are using a define-based implementation like that: static inline uint64_t HAL_Time_SysTicks1kHzToTime(uint64_t sysTicks) { #if defined(CH_CFG_ST_FREQUENCY) && (CH_CFG_ST_FREQUENCY == 1000) #define SYS_TICKS_TO_100_NANO_SECONDS 10000 #elif defined(CH_CFG_ST_FREQUENCY)...
> @martin-kuhn for consistency, could you please remove the define of HAL_Time_CurrentSysTicks on the other platforms and replace it with a call to the appropriate function? If you're comfortable with...