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
```
64bit system timer issues
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: 64bit system timer issues
Hi,
Try increasing the delta parameter, it is required when going to higher frequencies, you need to find the value experimentally because it depends also on the duration of your timer callbacks. Keep assertions enabled while doing this.
Giovanni
Try increasing the delta parameter, it is required when going to higher frequencies, you need to find the value experimentally because it depends also on the duration of your timer callbacks. Keep assertions enabled while doing this.
Giovanni
Re: 64bit system timer issues
If you don't need "global" 1us resolution, have a look at the last post here. It uses a separate counter to implement a high resolution virtual-timer style timer. Might need a little tweaking for your platform. I've also done something similar limited to the two or four comparators of a timer; limits the number of active timers, but less overhead.
Who is online
Users browsing this forum: No registered users and 44 guests