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/AM3354: Clock timer module

Part Number: AM3354
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

#1. Select timer ID ANY in clock module in SYSBIOS GUI, code can't run to main. 

#2. Configure CLK module in main(), code works.

#3. Further debug found  the CLK timer is not enabled by sysbios through static configuration.

Some post suggest to use gel to enable timer, but for a standalone system, how to enable CLK timer before SYSBIOS use it? is it a SYSBIOS bug?

  • The RTOS team have been notified. They will respond here.
  • Tony,

    The SYSBIOS Timer module only configures the Timer peripheral.  If the Timer requires some sort of CLK to be enabled, that is outside the scope of the Timer module.

    Some SOC requires the ARM to program the DSP clks, in your case if you can configure it in main, sounds like a reasonable solution.  We also provide a couple of startup hooks, if it was required to be done earlier (before main).

    Judah

  • Judah,

    In main(), configure clock mode as below, it works, no matter which timer ID as Timer_create() argument. the code did not configure timer clock module enable, why it also work?

        Timer_Params timerParams;

        Timer_Handle myTimer;

        Timer_Params_init(&timerParams);

        timerParams.period = 24000;

        timerParams.periodType = Timer_PeriodType_COUNTS;

        timerParams.startMode = Timer_StartMode_AUTO;

        myTimer = Timer_create(1, mytimer, &timerParams, &eb);

        if (myTimer == NULL) {

          UART_printf("Timer create failed\n");

        }

    But why select other timer except TIME ID=0 (timer 2), the project can't run to main()? and where enabled timer 2?

     

  • Hi Tony,

    I think i misunderstood what you were originally saying.

    I do not know why doing it in main() versus the config would make a difference. They should do the same thing.
    Is this reproducible on a basic TIRTOS example or is this unique to some app that you are running?

    Judah
  • Judah,

    Yes, it is reproducible definitely on a empty board.  When select timer Id other than 0 or ANY, report error as below upon download .out.

    Versus Timer Id=0

  • Tony,

    Can you attached a failing project of your onto here? I was able to built a default program and it successfully ran to main() without any issue. I did not have to create Timer in main.

    Also, what version of SYSBIOS and CCS are you using and which codegen tools too?

    Judah
  • am335x_bios.zip

    attache the project, it is based on CCS created example project.

    Below post is similar issue, but why Timer Id=0 (actual timer 2) works? who/when enabled hardware timer 2?

  • Tony,

    I took your project and just loaded your executable and it ran fine for me.  It gets to main() with no issue and then when I run it, it prints:

    enter main()
    enter taskFxn()
    exit taskFxn()

    When you run via CCS, did you make sure to have the right gel files loaded?

    Judah