I 'm got started coding the RTOS program by using RTX. And I encountered The error "OS_ERROR_TIMER_OVF" . According to the following program,It is occurred "due to User Timer Callback Queue overflow detected". So, I changed the OS_TIMERCBQS value from 4 to 25. But the error is not disappeared.
void os_error (uint32_t error_code) { /* HERE: include optional code to be executed on runtime error. */ switch (error_code) { case OS_ERROR_STACK_OVF: /* Stack overflow detected for the currently running task. */ /* Thread can be identified by calling svcThreadGetId(). */
tid_overstack = svcThreadGetId(); break; case OS_ERROR_FIFO_OVF: /* ISR FIFO Queue buffer overflow detected. */ break; case OS_ERROR_MBX_OVF: /* Mailbox overflow detected. */ break; case OS_ERROR_TIMER_OVF: /* User Timer Callback Queue overflow detected. */ break; default: break; } for (;;); } How should I do to resolve the error? If you know the solution ,Please let me know.
The queue is called "osMessageQId_osTimerMessageQ"
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.
This may not be logically what you want, but I am sure you don'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
Robert,
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.
When I watch 'osMessageQId_osTimerMessageQ' address in a Memory window i can see a register that look to count up to the 'Timer Callback Queue size' (set at 8). Are the following values the callback addresses? I am having trouble deciphering what the data bytes at the 'osMessageQId_osTimerMessageQ' address all mean.
I also am using Segger emWin in my project and have now discovered it is all creating an osTimer to measure systems ticks. This 'GUI_Timer' is periodic and the source code files are locked so i can not edit them.
Do you have any thoughts?
Thanks, Tim