This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTX timer tick rate

Hello,

I was wondering if any of you uses RTX with a tick rate faster than 10 milliseconds. Franc Urbanc, RTX's author, recommends this setting but I am not sure why - a context switch overhead of a LPC2478 running at 72[MHz] will be about 6 microseconds. However, when we try to set the tick rate to 1 millisecond or 100 microsecond, RTX seems to hang after about 10 minutes (when at 100 microseconds) in this code:

void os_put_prio (P_XCB p_CB, P_TCB p_task) {
   /* Put task identified with "p_task" into list ordered by priority.       */
   /* "p_CB" points to head of list; list has always an element at end with  */
   /* a priority less than "p_task->prio".                                   */
.
.
.
  /* Search for an entry in the list */
   while (p_CB2 != NULL && prio <= p_CB2->prio) {
      p_CB = (P_XCB)p_CB2;
      p_CB2 = p_CB2->p_lnk;
   }

sometimes, we see only one entry in the linked list whose left and right pointer point to the entry itself, resulting in a system deadlock. Yes, we probably can get away with a tick rate of 10 milliseconds, but I would appreciate your insight anyway.

Parents
  • OK, I managed to run my test program on the simulator at 72[MHz], and call 'isr_evt_set' from a periodic interrupt. Everything seems to working fine, damn it :-)
    I am going to remove all the calls to this API tomorrow and see what the real target does, as well as run this little rpgram on the real thing. Maybe it dies and we have finally a test case for Franc Urbanc...? But again: I can (and have done so!) write a preemptive scheduler myself to do the task switching. How come that we have som much trouble with these functions. How can we stabilize a product like this? No offense, but I am seriously considering other options. I cannot deliver a product that is not stable. I just can't.

Reply
  • OK, I managed to run my test program on the simulator at 72[MHz], and call 'isr_evt_set' from a periodic interrupt. Everything seems to working fine, damn it :-)
    I am going to remove all the calls to this API tomorrow and see what the real target does, as well as run this little rpgram on the real thing. Maybe it dies and we have finally a test case for Franc Urbanc...? But again: I can (and have done so!) write a preemptive scheduler myself to do the task switching. How come that we have som much trouble with these functions. How can we stabilize a product like this? No offense, but I am seriously considering other options. I cannot deliver a product that is not stable. I just can't.

Children