|
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
|
|
|
|
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,
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
|
|
|
|
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:
|