Page 1 of 1

timedelta during the timer interrupt in tickless mode  Topic is solved

Posted: Tue Nov 29, 2016 5:45 pm
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

Re: timedelta during the timer interrupt in tickless mode

Posted: Tue Nov 29, 2016 7:19 pm
by Giovanni
Hi,

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

Giovanni

Re: timedelta during the timer interrupt in tickless mode

Posted: Thu Jan 12, 2017 9:52 am
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

Re: timedelta during the timer interrupt in tickless mode

Posted: Thu Jan 12, 2017 11:49 am
by Giovanni
Any news?

Giovanni