Sign in

username:

password:



Not a member?

Search code-comp



Search tips

Subscribe to code-comp



code-comp by Keywords

ARM7 | BIOS | Bug | EVM | JTAG | Linker | LOG_printf | McBSP | Profiling | Relocation | RTDX | Simulator | Target | Watch

Discussion Groups

Discussion Groups | Code-Composer | Re: [c6x] Fwd: Re: How to speed up profiling

Technical discussions about Code Composer Studio.

  

Post a new Thread

Re: [c6x] Fwd: Re: How to speed up profiling - Ganesh Vijayan - Apr 30 6:05:00 2004



Hi Yong,
You need to perform initialization steps for the Timer Module before you can start the module.
Also send across your code, if possible. I will try and see what is the mistake you are committing.
BTW, you needn't enable the clock. The clock is enabled through the Software only.
HTH,
Ganesh
----- Original Message -----
From: Yong Yang
To: Ganesh Vijayan
Cc: c...@yahoogroups.com ; c...@yahoogroups.com
Sent: Friday, April 30, 2004 9:45 AM
Subject: [c6x] Fwd: Re: [code-comp] How to speed up profiling

HI, ganesh
 
Do i have to enable clock as well when using TIMER_getCount()? If i enable it, the same error message (invalid CIO command) comes out.
 
Thank you
 
Yong

Note: forwarded message attached.











(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )

Re: [c6x] Fwd: Re: How to speed up profiling - Yong Yang - Apr 30 6:24:00 2004

Hi, Ganesh
 
My code in main()
 
Uint32 start, stop;
CSL_cfgInit();  //initialization  function generated by CDB
TIMER_start(hTimer1);
start = TIMER_getCount(hTimer1);
 
.....//other code

stop = TIMER_getCount(hTimer1);
printf("start: %d\n", start);
printf("stop: %d\n", stop);
printf("cycles: %d\n", stop - start);
 
in videocfg_c.c generated by CDB file
 
void CSL_cfgInit()
{
    hTimer1 = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);
    TIMER_config(hTimer1, &timerCfg0);
}
 
thanks
Yong

Ganesh Vijayan <g...@emuzed.com> wrote:
Hi Yong,
You need to perform initialization steps for the Timer Module before you can start the module.
Also send across your code, if possible. I will try and see what is the mistake you are committing.
BTW, you needn't enable the clock. The clock is enabled through the Software only.
HTH,
Ganesh
----- Original Message -----
From: Yong Yang
To: Ganesh Vijayan
Cc: c...@yahoogroups.com ; c...@yahoogroups.com
Sent: Friday, April 30, 2004 9:45 AM
Subject: [c6x] Fwd: Re: [code-comp] How to speed up profiling

HI, ganesh
 
Do i have to enable clock as well when using TIMER_getCount()? If i enable it, the same error message (invalid CIO command) comes out.
 
Thank you
 
Yong

Note: forwarded message attached.










(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )

Re: [c6x] Fwd: Re: How to speed up profiling - Ganesh Vijayan - Apr 30 6:53:00 2004

Hi Yong,
Did you set the configuration parameters for the module properly ? Are you using the correct CSL for the chip ?
Have you set the parameters of timercfg0 correctly ?
Perform a reset timer before you config your timer i.e. TIMER_config.
Also one more important thing is that you need to multiply the difference by 8 i.e. any output from the TIMER module is scaled down by 8. You are missing the multiplication by 8.
Kindly verify the same.
Thanks and Regards,
Ganesh
----- Original Message -----
From: Yong Yang
To: Ganesh Vijayan
Cc: c...@yahoogroups.com ; c...@yahoogroups.com
Sent: Friday, April 30, 2004 11:54 AM
Subject: Re: [c6x] Fwd: Re: [code-comp] How to speed up profiling

Hi, Ganesh
 
My code in main()
 
Uint32 start, stop;
CSL_cfgInit();  //initialization  function generated by CDB
TIMER_start(hTimer1);
start = TIMER_getCount(hTimer1);
 
.....//other code

stop = TIMER_getCount(hTimer1);
printf("start: %d\n", start);
printf("stop: %d\n", stop);
printf("cycles: %d\n", stop - start);
 
in videocfg_c.c generated by CDB file
 
void CSL_cfgInit()
{
    hTimer1 = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);
    TIMER_config(hTimer1, &timerCfg0);
}
 
thanks
Yong





(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )

Re: [c6x] Fwd: Re: How to speed up profiling - Yong Yang - Apr 30 7:34:00 2004

Hi, Ganesh
 
I use default configuration parameters for the module , see below
 
timerCfg0
INput Clock Source(CLKSRC)              External Source
Cl;ock/Pulse Mode(CP)                          Pulse mode
Pulse Width (PWID)                                  one clock cycle
Function of TOUT(FUNC)                     General_Purse Output
  DAta Oputput(TOUT pin)                    0
  TOUT Inverter Control(INVOUT)   Uninverted
  TINP Inverter Control(INVINP)     Uninverted
Timer Operation              &n bsp;               & nbsp;        Hold
Period Value                                 ;                0x0
Counter Value                                 ;             0x0
Control REgister(CTL)             &nbs p;              0x0
Period Register(PRD)             &nbs p;               0x0
Counter REgister(CNT)             &nbs p;            0x0
 
Timer_Device1
Open Timer Device                ;      True
Handle            &n bsp;               & nbsp;                hTimer1
Enable Pre-INitailization        True
Pre-INitailize with               & nbsp;     TimerCfg0

Thanks

Yong


 
Ganesh Vijayan <g...@emuzed.com> wrote:
Hi Yong,
Did you set the configuration parameters for the module properly ? Are you using the correct CSL for the chip ?
Have you set the parameters of timercfg0 correctly ?
Perform a reset timer before you config your timer i.e. TIMER_config.
Also one more important thing is that you need to multiply the difference by 8 i.e. any output from the TIMER module is scaled down by 8. You are missing the multiplication by 8.
Kindly verify the same.
Thanks and Regards,
Ganesh
----- Original Message -----
From: Yong Yang
To: Ganesh Vijayan
Cc: c...@yahoogroups.com ; c...@yahoogroups.com
Sent: Friday, April 30, 2004 11:54 AM
Subject: Re: [c6x] Fwd: Re: [code-comp] How to speed up profiling

Hi, Ganesh
 
My code in main()
 
Uint32 start, stop;
CSL_cfgInit();  //initialization  function generated by CDB
TIMER_start(hTimer1);
start = TIMER_getCount(hTimer1);
 
.....//other code

stop = TIMER_getCount(hTimer1);
printf("start: %d\n", start);
printf("stop: %d\n", stop);
printf("cycles: %d\n", stop - start);
 
in videocfg_c.c generated by CDB file
 
void CSL_cfgInit()
{
    hTimer1 = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);
    TIMER_config(hTimer1, &timerCfg0);
}
 
thanks
Yong





(You need to be a member of code-comp -- send a blank email to code-comp-subscribe@yahoogroups.com )