<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>OS_ERROR_TIMER_OVF error</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/36154/os_error_timer_ovf-error</link><description> 
I &amp;#39;m got started coding the RTOS program by using RTX. And I
encountered The error &amp;quot;OS_ERROR_TIMER_OVF&amp;quot; . According to the
following program,It is occurred &amp;quot;due to User Timer Callback Queue
overflow detected&amp;quot;. So, I changed the OS_TIMERCBQS value from</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: OS_ERROR_TIMER_OVF error</title><link>https://community.arm.com/thread/129441?ContentTypeID=1</link><pubDate>Thu, 24 Aug 2017 05:20:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ea2223f6-307c-443c-9ca3-c451506e1cfc</guid><dc:creator>Tim Hamilton</dc:creator><description>&lt;p&gt;&lt;p&gt;
Robert,&lt;/p&gt;

&lt;p&gt;
Thank you telling where to find the queue. I have already
configured my timers as one-shot based on your advice from the
original poster. I have a total of 7 timers but only one runs
constantly and when its callback is entered the first thing I do is
stop that timer and the last thing I do is re-start the timer, if, of
course, I need to.&lt;/p&gt;

&lt;p&gt;
When I watch &amp;#39;osMessageQId_osTimerMessageQ&amp;#39; address in a Memory
window i can see a register that look to count up to the &amp;#39;Timer
Callback Queue size&amp;#39; (set at 8). Are the following values the
callback addresses? I am having trouble deciphering what the data
bytes at the &amp;#39;osMessageQId_osTimerMessageQ&amp;#39; address all mean.&lt;/p&gt;

&lt;p&gt;
I also am using Segger emWin in my project and have now discovered
it is all creating an osTimer to measure systems ticks. This
&amp;#39;GUI_Timer&amp;#39; is periodic and the source code files are locked so i can
not edit them.&lt;/p&gt;

&lt;p&gt;
Do you have any thoughts?&lt;/p&gt;

&lt;p&gt;
Thanks,&lt;br /&gt;
Tim&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OS_ERROR_TIMER_OVF error</title><link>https://community.arm.com/thread/121141?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2017 13:17:53 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:fedb78d2-4bf1-4769-8a7e-0255840a4859</guid><dc:creator>Robert McNamara</dc:creator><description>&lt;p&gt;&lt;p&gt;
The queue is called &amp;quot;osMessageQId_osTimerMessageQ&amp;quot;&lt;/p&gt;

&lt;p&gt;
Just as a test, you may want to remove any periodic timers that
you have and make them 1-shot timers. Have to Code the processes the
timer Start the timer. If you use the periodic timer, it is possible
to have the same timer object queued many times. If you use the
1-shot and queue it in the routine that processes the timer then you
can have at most 1 in the queue. You should be able to make sure your
timerQ is large enough to hold 1 of every timer object you have.&lt;/p&gt;

&lt;p&gt;
This may not be logically what you want, but I am sure you don&amp;#39;t
want any cases that are terminal failures. It may be best to remove
any chance of terminal failures and handle some parts of your timer
outside of the timer queue mechanism&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OS_ERROR_TIMER_OVF error</title><link>https://community.arm.com/thread/109266?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2017 06:47:00 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:02a94d5c-d98c-4a9c-8da9-411d716f0610</guid><dc:creator>Tim Hamilton</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hello,&lt;/p&gt;

&lt;p&gt;
I am experiencing a similar issue where I get the
OS_ERROR_TIMER_OVF error. I only get this error when I put my device,
STM32L476 into STOP mode and then wake the device back up. I
understand that my error is likely application specific but I have
spent more than a week trying to debug it.&lt;/p&gt;

&lt;p&gt;
My question is how to I watch the timer callback queue? I think
that when I enter STOP mode there is a callback being left in the
queue that causes and overflow upon waking up. I have tried many
things in order to find the address of the queue with no luck.&lt;/p&gt;

&lt;p&gt;
Please help,&lt;br /&gt;
Tim&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OS_ERROR_TIMER_OVF error</title><link>https://community.arm.com/thread/83654?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2017 05:18:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:181db6c7-5c76-4b9c-9444-acd17c545e9f</guid><dc:creator>Y A</dc:creator><description>&lt;p&gt;&lt;p&gt;
Dear Mr. Robert McNamara&lt;/p&gt;

&lt;p&gt;
Thank you for your valuable comment.&lt;/p&gt;

&lt;p&gt;
I understood the meaning of OS_TIMERCBQS and I don&amp;#39;t change it to
extra size.&lt;/p&gt;

&lt;p&gt;
As you mentioned , I use one-shot or a periodic timer and add the
while loop in the timer thread not to use queue.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: OS_ERROR_TIMER_OVF error</title><link>https://community.arm.com/thread/70183?ContentTypeID=1</link><pubDate>Tue, 25 Jul 2017 07:48:24 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:83716b95-dbfe-445b-90d9-ff7401b1f45f</guid><dc:creator>Robert McNamara</dc:creator><description>&lt;p&gt;&lt;p&gt;
Don&amp;#39;t put more items into the Timer_Callback queue then there are
spaces in the Queue.&lt;/p&gt;

&lt;p&gt;
Items are put into the Queue every time a timer expires (this is
the 4/25 OS_TIMERCBQS)&lt;/p&gt;

&lt;p&gt;
These items are removed from the queue by the &amp;quot;Timer Thread&amp;quot;,
which is typically running at the highest thread priority on the
system. So, while the callbacks are running, no other threads are
running.&lt;/p&gt;

&lt;p&gt;
Until the current timer callback completes, no other callback
items are removed from the Queue. If items are put into the queue
faster than they can be processed, you will get an overflow.&lt;/p&gt;

&lt;p&gt;
Here are some possible issues / concerns / solutions.&lt;/p&gt;

&lt;p&gt;
1) put less code in your callbacks so they finish quicker.
Consider these very similar to ISR processing routines and keep then
very short.&lt;/p&gt;

&lt;p&gt;
2) Make the OS_TIMERCBQS large enough to hold the maximum number
of &amp;quot;active callback functions&amp;quot;. This is actually required that this
be large enough to hold the maximum number or you will get TIMER
overflows. Timer Queue overflows is not a recoverable error.&lt;/p&gt;

&lt;p&gt;
3) Making timers periodic can cause an unexpected / unplanned
number of callbacks to be put into the queue. A periodic timer is
rescheduled as soon as it is put into the TimerCallback queue and
this means that another item my be put into the queue before the
callback even starts to execute. You MAY want to reconsider making
these items periodic and instead have the callback function add the
timer when it is complete. This will assure that you never have the
same timer callback function queue more than once.&lt;/p&gt;

&lt;p&gt;
You are going to need to determine the maximum number of active
callbacks that your system may have at any moment. Your OS_TIMERCBQS
needs to be at least this size. You do not need to make it larger
than the maximum number of active callbacks, that size is actually
the perfect size. Making it larger than this number may actually hide
a bug in your code. This is not always easy to calculate, but it is
required if you want to be sure you will never overflow the queue. If
your design does not allow you to know for sure what this number is,
you will need to change your design so that you can know.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>