timedelta during the timer interrupt in tickless mode Topic is solved

Report here problems in any of ChibiOS components. This forum is NOT for support.
Post Reply
0xdeadbeef
Posts: 1
Joined: Tue Nov 29, 2016 5:36 pm
Been thanked: 1 time

timedelta during the timer interrupt in tickless mode

Post by 0xdeadbeef »

Hey Guys,

I'm porting ChibiosNIL currently to a special msp platform and running in some issues with the tickless mode. During a sleep the supplied time get compared against the CH_CFG_ST_TIMEDELTA variable and adjusted if the time is too short.

Now in the function chSysTimerHandlerI which gets called on a timer interval, the next value for another thread get calculated, but here it can be lower than CH_CFG_ST_TIMEDELTA. On my slow platform this leads to overflows in the timer because the capture value gets set lower than the current counter register. Is this a bug or am I using the whole system wrong :)

ty for your help

Used commit:

commit 55b0336818642ea4a350f58d979689015831440f
Author: tfateba <tfateba@35acf78f-673a-0410-8e92-d51de3d6d3f4>
Date: Fri Nov 4 23:36:20 2016 +0000

Add support for AVR, Arduino Mini board.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9901 35acf78f-673a-0410-8e92-d51de3d6d3f4
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: timedelta during the timer interrupt in tickless mode

Post by Giovanni »

Hi,

Moving this topic in "bug reports" for handling, I need to inspect that code.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: timedelta during the timer interrupt in tickless mode

Post by Giovanni »

Hi,

How high is your system tick frequency? perhaps it is too high for your system. The procedure in chSysTimerHandlerI() is meant to be executed in less than one tick, including the ISR.

Giovanni
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: timedelta during the timer interrupt in tickless mode

Post by Giovanni »

Any news?

Giovanni
Post Reply