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.
0xdeadbeef
Posts: 1
Joined: Tue Nov 29, 2016 5:36 pm
Been thanked: 1 time

timedelta during the timer interrupt in tickless mode  Topic is solved

Postby 0xdeadbeef » Tue Nov 29, 2016 5:45 pm

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: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: timedelta during the timer interrupt in tickless mode

Postby Giovanni » Tue Nov 29, 2016 7:19 pm

Hi,

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

Giovanni

User avatar
Giovanni
Site Admin
Posts: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: timedelta during the timer interrupt in tickless mode

Postby Giovanni » Thu Jan 12, 2017 9:52 am

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: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: timedelta during the timer interrupt in tickless mode

Postby Giovanni » Thu Jan 12, 2017 11:49 am

Any news?

Giovanni


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 8 guests