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/TMDXIDK5718: Timer 6 not working from DSP

Part Number: TMDXIDK5718
Other Parts Discussed in Thread: SYSBIOS, AM5718

Tool/software: TI-RTOS

Hi

I created a small sysbios (V6.46.5.55) program for the C66 DSP on my IDK5718. I'm using CCS 7.3.

It uses one task and one timer to run TimerFunction().
Each time TimerFunction() is called by the timer a counter increments.

The available timers are Timer5 and Timer6 (Availability Mask = 0x0030).
When I use timer 5 to run TimerFunction() the counter increments, but Task_sleep() does never return.
On the other hand, then I use timer 6 to run TimerFunction() then Task_sleep() returns but the counter remains at 0.

In both scenarios I can see that sysbios is using both timers (5 and 6), one for my TimerFunction() an the other for ti_sysbios_knl_Clock_doTick__I.
It comes out that Timer 6 does not generate interupts.

Then I had a look at the timer 6 configuration:
The timer is started in overflow mode (TCLR Register = 0x0000'0003); Timer 5 has the same setting here. so this seems correct.
As the Counter Register TCRR remaind at 0 I checked the timer input clocks:

For timers 5 to 8 these are configured via IPU_L3_GICLK and TIMERj_GFCLK (j=5...8).

The Register values are:

CM_IPU_CLKSTCTRL (Addr. 0x4A00 5540): 0x00003F02, which seems correct
CM_IPU_TIMER6_CLKCTRL (Addr. 0x4A00 5560): 0x0000'0002, which is also correct (according to silicon errata advisory i874, to avoid "TIMER5/6/7/8 Interrupts Not Propagated" bug)

Attached you find my project.
Can you confirm this behaviour?
What else could Timer 6 prevent from running?

Regards,
Markus

C66 on IDK5718 - Timer 6 not working.zip

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

    I tried your test project with SYSBIOS 6.46.5.55 on an AM572x GP EVM. For timer 5, I don't have any issue for timerISR counter increment, and task-sleep finished. I selected the platform as evmAM572X. For timer 6, the timer is unavailable.

    Regards, Eric
  • Hi Eric

    What timers have been used by SYSBIOS?

    Regards
    Markus

  • Hi Eric

    You said you tried my test project.
    How did you manage to only use timer 5 for the TimerFunction() and for SYSBIOS internel use (Task_sleep) at the same time?

    As you said timer 6 is not available; which timers are used when you run my project on your platform? (see ROV viewer -> Timers)

    Regards,
    Markus

  • Hi,

    Attached is the test project with pre-built out file. I saw both Timer interrupt counter (timer id 5, GP timer 6) increased and TaskSleep() returns (timer id 4, GP Timer 5).

    Regards, Eric

    2330.temp.zip


  • Hi Eric

    I saw that you changed the config file a little bit, but this did not help.

    Meanwhile I experimented with different settings and debug strategies.
    Suddenly I realised that it works, but first could not figure out what I did differently.

    After some more tests I found out that:

    Setup 1) it does "not* work when I debug like this:

    - complete power down / power up of the IDK
    - launch target configuration
    - connect to A15 -> gel files are executed (to get the C66 out of reset)
    - connect to C66
    - load the program
    - program halts at main and does not work ("counter" remains at 0, Task_Sleep returns)

    Setup2) it does work when I do this:

    - complete power down / power up of the IDK
    - launch target configuration
    - connect to A15 -> gel files are executed (to get the C66 out of reset)
    - choose menu "Run / Debug as / Code Composer Studio Debug Session"
    - program halts at main and it works ("counter" counts up, Task_Sleep returns)

    Can you give me a hint what is done differently on Setup 2 ?

    Regards,
    Markus

  • Hi,

    My test is based on the setup 1) only difference is I used a GP EVM. I don't understand your setup 2), how you connect to C66 and when you load the code?

    Regards, Eric
  • Hi Eric

    With setup 2) Code Composer Studio creates a Debug Configuration and launches it.
    When it is launched the Debug Cinfiguration automatically connects to the C66 and loads the program.
    After that the program is halted at main().

    After that the newly created Debug Configuration shows up in the Debug Configurations list.
    From that point on, this Debug Configuration can be launched manually and it also works.

    This is a black box for me; I don't know what Code Composer Studio is doing behind the scenes.
    I think somehow it configures some registers (via gel file?), because the program code used in setup 1) und 2) is
    absolutely identical.
    I hoped you (or someone else from TI) could bring some light on this behaviour.

    Maybe you have to use the same IDK (AM5718) to reproduce my results.

    Regards,
    Markus