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.

Cannot run CE universal_copy example built with CCSv5

Other Parts Discussed in Thread: SYSBIOS

Hello,

I'm trying to run the CE universal_copy example built with CCSv5.2 by following these steps. I was able to build the example successfully as I commented in this post. After connecting the C674x with my XDS560v2 JTAG loading and running the CE_example.out the execution remains in this loop:

From my understand, the building generates a single executable that run locally on the C674x (Both application and codec server run in this processor). What should I do in order to run the built example and get the out.dat output file as expected?


Regards,
Gaston

  • Gaston,

    Which device are you running on?  

    If the program is stuck in that dmtimer initialization code it is likely due to the functional or interface clocks to the timer peripheral not being enabled.  Are you using a GEL file in your CCS configuration? Is there a menu item to enable clocks to the timers?

    Scott

  • Scott Gary said:
    Which device are you running on?

    I'm running on the dm816x EVM.

    Scott Gary said:
    Are you using a GEL file in your CCS configuration?

    Yes, I'm using this one from Spectrum Digital site. I couldn't find a CCSv5.x GEL for dm816x.

    Scott Gary said:
    Is there a menu item to enable clocks to the timers?

    Okay, let me check it tomorrow, I'll keep you informed about this.

    Regards,
    gaston

  • Hi Scott,

    I'm not able to find a menu for enabling the clocks as you suggested.

    I've noticed in this processor.wiki there is an issue related to dmtimer configuration for TI81xx. Therefore I've added the next code to my SYS/BIOS .cfg file:

    /* set the Timer frequency to 20MHz */
    var Timer = xdc.useModule('ti.sysbios.timers.dmtimer.Timer');
    Timer.intFreq.hi = 0;
    Timer.intFreq.lo = 20000000;

    After building, loading and running the application I've checked the ROV view but I observe an increase rate of 0. I've also tried to decrease the Timer.intFreq.lo to 32KHz with no luck. Could you help me with this issue?

    Regards,
    gaston

  • Gaston,

    The page you refer to is a good one to describe the variety of configurations of the input clock frequency fed to a dmtimer (which is also referred to as “GP Timer” on some devices).  

    That code snippet can be used to tell SYS/BIOS the value that has been configured; this is for “information only”, and it doesn’t enable the corresponding frequency selection for the timer.  That is typically done by higher-level entity like the high-level OS, or bootloader, etc., as described in that page.

    For your particular case, is there Linux or some other OS running on the A8 that is configuring the system and enabling and setting clocks to the different parts of the SoC?  I’d mentioned the GEL file because usually there will be some controls in the GEL file to explicitly enable the clocks for the timers when they are being used in a debug environment, when for example, the high-level OS is not running and configuring the clocks.  I’ve not used the DM8168, and it sounds like there isn’t this support in that GEL file.

    I think the first thing to do is to check the corresponding clock selection register in the Power Reset and Clock Management Module (PRCM) for the timer you are using.  This detailed information is in the Technical Reference Manual (http://www.ti.com/lit/ug/sprugx8/sprugx8.pdf).  For example, look at table 18-21 to determine the name of the clock signal for the timer you are using.  Then look at the corresponding CM_TIMER1x_CLKSEL register in memory to determine which clock is selected.  For example, for Timer 2, look at the CM_TIMER2_CLKSEL register.  The default value for this is 0x1, which would select an external 32KHz clock.  It seems from your code snippet that you want this to be CLKIN instead?  If there is no external 32KHz clock available for your setup then it would explain why the startup code is getting stuck there, because the timer is non-functional and can’t perform a soft reset.  

    Another thing that can sometimes happen on these SoC devices is that “emulation suspend” can keep the timer from running.  In the timer’s TIOCP_CFG register there is an EMUFREE bit that determines if the timer is frozen in emulation mode or not.  Even though the C674 may be running, the “ownership” of suspend for the timer might be assigned to the A8.  So unless the A8 is running, the timer will be held suspended.  To determine if this is what is going on, you can poke the EMUFREE bit for the timer in CCS to set it to “1” and see if the timer becomes functional.  I did a quick scan and don’t know how, or if it is possible on the DM8168 to assign this suspend ownership for the timers.  If you find that setting EMUFREE makes the timer functional, then I can ask the device team about this control setting.

    Hope this helps.

    Scott