My Linux Kernel is 2.6.32, downloaded from TI's website, it is abnormal when I call TSK_sleep in DSP Side.
At Beginning, It is blocked in DSP Side, not return.
Then, I found the timer's configuration in Linux Kernel as following:
1)enable timer0
2)config T0_BOT as clock event, T0_TOP as clock source,T1_BOT reversed for DSP.
So, I enable the timer1 in the function of davinci_timer_init in arch/arm/mach-davinci/time.c as following:
timer_clk1 = clk_get(NULL, "timer1") ;
BUG_ON(IS_ERR(timer_clk1)) ;
clk_enable(timer_clk1) ;
at the same time, I modified the INPUTCLK in .tcf for DSP Side as following:
prog.module("CLK").INPUTCLK = 247.5 ;
After above two modification, I fount it does not block, it has response !
But, the real time is abnormal, such as:
TSK_sleep(2), the real time is about 2S;
TSK_sleep(20), the real time is about 20S;
I guress the INPUTCLK is not correct, so I modified it to 247500,but the real time is still abnormal:
TSK_sleep(2), the real time is about 1.7S;
I modified it to 247500000,but the real time is still abnormal:
TSK_sleep(2), the real time is about 14ms.
In a word, I guess the INPUTCLK is not correct, but I do not know how to modify it.
So, I want to need some help from TI's experts. Would you tell me how to config the timer0 and timer1 in Linux Kernel and DSP Server ?
Thank you very much