How to use the time0 capture mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to use the time0 capture mode

835件の閲覧回数
13560436802
Contributor II

I want to use the time0(DIO3) capture mode to measure infrared pulse width,

1. time0 initialize :

    vAHI_TimerSetLocation(E_AHI_TIMER_0,TRUE,FALSE);
   vAHI_TimerEnable(E_AHI_TIMER_0,0,FALSE,TRUE,FALSE);
   vAHI_TimerConfigureInputs(E_AHI_TIMER_0,TRUE,FALSE);
   vAHI_TimerStartCapture(E_AHI_TIMER_0);

2. time0 interrupt callback:

   PUBLIC void vISR_TimCaptureCallback(void)
   {
      vAHI_TimerReadCapture(IR_CAPTURE_TIME,&pu16Hi,&pu16Lo);
      DBG_vPrintf(APP_TIM_DEBUG, "cap1:[Hi:0x%x][Lo:0x%x]-----------\n",pu16Hi,pu16Lo);
   }

3. problem:

    It enter the interrupt all the way when there isn't any pulse input;

pastedImage_15.png

Can you tell me how to use time0 capture mode to measure the continuous pulse width;

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

712件の閲覧回数
mario_castaneda
NXP TechSupport
NXP TechSupport

Hi Dylan,

Please look at the vAHI_TimerReadCaptureFreeRunning

JN516x Integrated Peripherals API User Guide

Regards,

Mario

0 件の賞賛
返信

712件の閲覧回数
13560436802
Contributor II

Hi Maro,

  What caused the error??

pastedImage_1.png

0 件の賞賛
返信