Hi all,
I wanted to signal a "breakthrough" achieved in the RT kernel starting from revision 7551.
Arbitrary High System Time Resolution
Now it is possible to set CH_CFG_ST_FREQUENCY to any frequency achievable by the used timer. Virtual timers and timeouts will work with the specified resolution.
There are things to consider when pushing the frequency:
1) The time conversion macros like MS2ST() can fail because integer overflows in the 32bits range used by the macros, I am considering allowing 64 bits math there. Constant expressions should not result in actual 64 bits arithmetic code in the system but I have to reason some more about it.
2) Special care must be taken in choosing the value for CH_CFG_ST_TIMEDELTA. This value represents the "uncertainty" level because system jitter. Basically the value is the number of cycles of acceptable jitter in the VTs subsystem. The value is a time interval expressed in system ticks that must be greater than: Longer VT callback routine + time spent in fast IRQs + safety number of cycles.
I tested on an F4 using CH_CFG_ST_FREQUENCY=4000000 and CH_CFG_ST_TIMEDELTA=16, the test suite passes using those values. Note that times specified for VTs can have an error up to CH_CFG_ST_TIMEDELTA*2 cycles (in excess).
Being the matter complex, frequencies in excess of 100kHz are only recommended in case of real necessity of such high resolutions.
Giovanni
[NEWS]Very High Resolutions in Tickless Mode
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [NEWS]Very High Resolutions in Tickless Mode
Outstanding numbers! But did you have a deal with projects requiring such resolution?
If yes - what was that (if this information is not against your NDAs)?
If yes - what was that (if this information is not against your NDAs)?
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [NEWS]Very High Resolutions in Tickless Mode
Of course I cannot comment things under NDA, assuming there are such things 
It is just the natural evolution path for RT. Competition does not sleep so better push ahead in terms of performance and features.
Giovanni
It is just the natural evolution path for RT. Competition does not sleep so better push ahead in terms of performance and features.
Giovanni
Re: [NEWS]Very High Resolutions in Tickless Mode
Which ChibiOs v3 revision is included in Chibistudio Preview 8 ?
Thanks
Thanks
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: [NEWS]Very High Resolutions in Tickless Mode
Frankly I don't remember, you could replace it with a specific revision if you need to keep track of it. Not much different from the current trunk anyway, I just added things since.
Giovanni
Giovanni