64bit system timer issues
Posted: Fri Jan 29, 2021 11:01 pm
Hello!
On ChibiOS/RT 20.3 (https://github.com/ChibiOS/ChibiOS/tree/stable_20.3.x) I'm trying to switch system timer to 64 bit mode.
If system tick frequency is 10 000 everything works. But if I change it to 1000 000 (I need 1 microsecond time precision) or even 100 000, then everything goes wrong, e.g. chThdSleep() sleeps for incorrect time (and every time different).
In 32 bit mode everything works fine.
Didn't find any demos in 64 bit mode, is it fully supported?
```
CPU: STM32F765II
#define CH_CFG_ST_RESOLUTION 64
#define CH_CFG_ST_FREQUENCY 100000
#define CH_CFG_INTERVALS_SIZE 64
#define CH_CFG_TIME_TYPES_SIZE 32
#define CH_CFG_ST_TIMEDELTA 2
#define STM32_ST_USE_TIMER 5
```
On ChibiOS/RT 20.3 (https://github.com/ChibiOS/ChibiOS/tree/stable_20.3.x) I'm trying to switch system timer to 64 bit mode.
If system tick frequency is 10 000 everything works. But if I change it to 1000 000 (I need 1 microsecond time precision) or even 100 000, then everything goes wrong, e.g. chThdSleep() sleeps for incorrect time (and every time different).
In 32 bit mode everything works fine.
Didn't find any demos in 64 bit mode, is it fully supported?
```
CPU: STM32F765II
#define CH_CFG_ST_RESOLUTION 64
#define CH_CFG_ST_FREQUENCY 100000
#define CH_CFG_INTERVALS_SIZE 64
#define CH_CFG_TIME_TYPES_SIZE 32
#define CH_CFG_ST_TIMEDELTA 2
#define STM32_ST_USE_TIMER 5
```