This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TM4C123GH6PM: Need a function to run every 8.5 MicroSeconds Question

Part Number: TM4C123GH6PM

Tool/software: TI-RTOS

I am trying to meet a hard-timing of a peripheral and it needs to be serviced every 8.5 microSeconds and I am wondering how I would accomplish this in TI-RTOS

Currently I am using a Timer created in the CFG file but it seems to oscillate between missing timings and shifting a bit the timer period is set to 8microseconds and set to run continuously

Is there a way to meet this timing in TI-RTOS - Maybe I have to many things enabled in the back ground killing my timings?

I tried changed the system clock down to microsecond but then the program just gets bogged down in ISR's 


basically what's the best way to ensure a task is being run constantly every 8microSeconds like clockwork or is this something I should just do without TI-RTOS?

Thanks.

  • Chris,

    Your use of a timer is a good approach. It sounds like you have very tight timing requirements. Perhaps you need to use a non-dispatched ISR. This will eliminate the overhead of using the TI-RTOS Hwi Dispatcher. However, you will not be able to make any TI-RTOS API calls in your ISR. Set the 'useDispatcher' Hwi_Params to false when you create the Hwi instance.

    In your ISR, you could set a flag if you want a task to run. In your idle task, you could look at this flag and post a semaphore to run the task.

    ~Ramsey