cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Input Capture in MCBSTR9 Board

nanuradha
Associate II
Posted on November 20, 2006 at 14:19

Problem with Input Capture in MCBSTR9 Board

4 REPLIES 4
nanuradha
Associate II
Posted on May 17, 2011 at 09:34

Hai all,

we are using MCBSTR9 Evaluation board.

Now we are trying to implement Input capture.

for that we generated a PWM signal from Timer0 and that signal is applied to input capture pin of Timer2.

here we are getting PWM signal but we are not able to get the capture value. i am testing this code through DEBUG. in my program i am not getting INPUT CAPTURE FLAG. so my program is strucked there itself.

here i am sending the code please find the attachment and have a glance of this program and give u'r sugessions.

cheers..

-=raj=-

Posted on May 17, 2011 at 09:34

hi anuradha,

I read your piece of code.

I didn't try it but for what I can see

your intention is to program the GPIO7 pin4

for the input capture, isn't it?

If I guessed.... the configuration for the GPIO7

is wrong.

I suggest you to modify the GPIO pin assignment:

if you'd like to use ICAP you have to configure GPIO_Pin_3 (4th pin of this port )!

Regards,

Steve

nanuradha
Associate II
Posted on May 17, 2011 at 09:34

Hai Steve,

i have solved that problem by changing the Timer from Timer2 to Timer1.

But i don't know that why Timer2 is not working.

i mean timer01 is one group and timer23 is another group. only timer01 is working but not timer23.

expecting help regarding this.

cheers...

-=raj=-

amira1
Associate II
Posted on May 17, 2011 at 09:34

hi anuradha;

please find attached an example using TIM0 in PWM output mode and TIM2 in ICAP_CHANNEL_1 mode and it works as expected.

May be you are making a confusion between ICAP_CHANNEL_1 mode and PWMI mode.

In PWMI mode, if we connect P4.4 to P6.0, the value of OC1_TIM0 is stored into IC1_TIM2 and the value of OC2_TIM0 is stored into IC2_TIM2. However ICAP_CHANNEL_1 mode, only OC2_TIM0 is stored into IC1_TIM2.

regards,

mirou