Texas Instruments TMS320C64x DSP Network Card User Manual


 
Example 1: Noncontinuous Frame Capture for 525/60 Format
Video Port Configuration ExamplesA-6 SPRU629
/* –––––––––––––– */
/* enable capture */
/* –––––––––––––– */
/* set VCEN bit to enable capture */
VP_FSETH(vpCaptureHandle, VCACTL, VCEN, VP_VCACTL_VCEN_ENABLE);
/* clear BLKCAP in VCA_CTL to enable capture DMA events */
VP_FSETH(vpCaptureHandle, VCACTL, BLKCAP,
VP_VCACTL_BLKCAP_CLEAR);
}
/*–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– */
/* Function : VPCapChaAIsr */
/* Description : This capture ISR clears FRMC to continue capture */
/* in this noncontinuous mode and also clears other */
/* status bits. */
/*–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– */
interrupt void VPCapChaAIsr(void)
{
Uint32 vpis = 0;
/* Get video port status register value */
vpis = VP_RGETH(vpCaptureHandle, VPIS);
if(vpis & _VP_VPIS_CCMPA_MASK) /* capture complete */
{
/* Clear frame complete bit in VCX_CTL to */
/* continue capture in noncontinuous mode */
VP_FSETH(vpCaptureHandle, VCASTAT, FRMC,
VP_VCASTAT_FRMC_CLEAR);
/* Clear CCMPA to enable next frame complete */
/* interrupts */
VP_FSETH(vpCaptureHandle, VPIS, CCMPA,VP_VPIS_CCMPA_CLEAR);
capChaAFrameCount++; /* increment captured frame count */
}
if(vpis & _VP_VPIS_COVRA_MASK) /* overrun error */
{
capChaAOverrun++;
VP_FSETH(vpCaptureHandle, VPIS, COVRA,VP_VPIS_COVRA_CLEAR);
}
if(vpis & _VP_VPIS_SERRA_MASK) /* synchronization error */
{
capChaASyncError++;
VP_FSETH(vpCaptureHandle, VPIS, SERRA,VP_VPIS_SERRA_CLEAR);
}