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;
Can you tell me how to use time0 capture mode to measure the continuous pulse width;
Hi Dylan,
Please look at the vAHI_TimerReadCaptureFreeRunning
JN516x Integrated Peripherals API User Guide
Regards,
Mario
Hi Maro,
What caused the error??