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
|
|
Re: [c6x] Fwd: Re: How to speed up profiling
Started by ●April 30, 2004
Reply by ●April 30, 20042004-04-30
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:
|
Reply by ●April 30, 20042004-04-30
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
|
|
Reply by ●April 30, 20042004-04-30
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
Hold
Period
Value
0x0
Counter
Value
0x0
Control
REgister(CTL)
0x0
Period
Register(PRD)
0x0
Counter
REgister(CNT)
0x0
Timer_Device1
Open Timer
Device
True
Handle
hTimer1
Enable
Pre-INitailization True
Pre-INitailize
with
TimerCfg0
Thanks Yong Ganesh Vijayan <g...@emuzed.com> wrote:
|