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.

Tiva CPU running TI-RTOS, what internal devices does the RTOS use in the CPU?

Other Parts Discussed in Thread: TM4C1294NCPDT, EK-TM4C1294XL, SYSBIOS

I am porting an application from a Stellaris 9D96CPU using CCS 5 to a Tiva part running CCS 6.01. The Stellaris CPU used “Safe RTOS” and used IRQ’s SVCall handler, PendSV handler and SysTick handler for the Safe RTOS. 

 

I created a new project for the Tiva using the TI-RTOS and I have much of the application ported and running. The CPU is a TM4C1294NCPDT on a EK-TM4C1294XL eval board.  I created the project with the CCS 6.01 “new project wizard” and added the TI-RTOS when the project was first built.  What I have not found yet is what resources in the CPU does the RTOS use? I know this is a CPU specific question as to what resources in the CPU are used but when I when dynamically install an IRQ for timer0 in the CPU using:

void timer0ReadInputsHndlr(UArg arg);

Hwi_Params_init(&hwiParams); //

myHwi = Hwi_create(INT_TIMER0A_TM4C129, timer0ReadInputsHndlr, NULL, &eb);

I get an error the IRQ is in use. ti.sysbios.family.arm.m3.Hwi: line 138: E_alreadyDefined: Hwi already defined: intr# 35”

 

If I use the following to install an IRQ, the IRQ will install properly. (I only changed the IRQ I am installing)

void timer0ReadInputsHndlr(UArg arg);

Hwi_Params_init(&hwiParams);

myHwi = Hwi_create(INT_TIMER2A_TM4C129, timer0ReadInputsHndlr, NULL, &eb);

 

I assume that I get the error installing the IRQ using because the RTOS is using that IRQ. I have not installed the IRQ “INT_TIMER2A_TM4C129” (35) previously in my application so it should be unused and install normally.

Question 1:

Any idea why I get the error when I try to install the IRQ “INT_TIMER2A_TM4C129” (35)?

Question 2:

Is there a document specific to the Tiva part that describes what CPU resources the TI-RTOS uses? I assume there is something that describes what timer the CPU used for the OS Heart Beat etc….

  • TI-RTOS uses the PendSV interrupt (interrupt 14) for managing the switch between Hwi and Task threads.

    By default, TI-RTOS uses the SysTick timer (interrupt 15) as the timer to drive the Clock module.

    The ti.sysbios.hal.Timer and the xdc.runtime.Timestamp module both use the Tiva's GP Timers.

    For each ti.sysbios.hal.Timer created by the user, one of the 8 GP Timers will be selected.

    The Timer ID to interrupt number matching is as follows:

    0 35
    1 37
    2 39
    3 51
    4 79
    5 81
    6 114
    7 115

    The Timestamp module allocates one of the ti.sysbios.hal.Timers for its use.

    I'm suspecting that your application is using the Timestamp module and that it has allocated timer 0 for use as a timestamp counter.

    Alan

  • That's basically what I was thinking what was going on.


    Is there a document for the TR-RTOS TIVA specific that describes how the RTOS uses the CPU's hardware? I think in my application I will be using a combination of using the GUI and using C code to configure and use CPU devices so it would be good to know what the RTOS/GUI are using.

    Thanks,

    Doug