Part Number: TDA2HG
HI master:
I have a problem on my VSDK0305,The hardware is TDA2XX.
my board boot as linux target,
now, I want make a gpio interrupt on M4[ipu2],
i follow the demo , but can't work well.
GPIO is GPIO2_6.
SDK: PROCESSOR_SDK_VISION_03_05_00_00.
We are reference processor_sdk_vision_03_05_00_00/ti_components/drivers/pdk_01_10_01_06/packages/ti/csl/example/gpio/gpio_interrupt/main.c.
processor_sdk_vision_03_05_00_00\vision_sdk\links_fw\src\rtos\links_ipu\vip_capture\captureLink_drv.c
Int32 CaptureLink_drvCreateInst(CaptureLink_Obj * pObj, UInt16 instId) //called cam_intb_init();
my code :
void configurGpioInterrupt()
{
#if 1
CSL_xbarIrqConfigure(CSL_XBAR_IRQ_CPU_ID_IPU2,IRQ_XBAR_INST_NO,IRQ_XBAR_INDEX);
#endif
int cpuid = System_getSelfProcId();
Intc_Init();
Intc_IntEnable(interrupt_num);
Vps_printf("Intc_IntRegister interrupt_num:%d\n",interrupt_num);
Intc_IntRegister(interrupt_num, (IntrFuncPtr) gpioIsr, (void *) 0);
Vps_printf("Intc_IntRegister end\n");
Intc_IntPrioritySet(interrupt_num, 1, 0);
Intc_SystemEnable(interrupt_num);
BspOsal_registerIntr(interrupt_num,gpioIsr,(void *) 0);
}
int cam_intb_init(void)
{
//m4pid0
/*Configure interrupt controller*/
configurGpioInterrupt();
/*Reset GPIO*/
Vps_printf("GPIOModuleReset-start\n");
GPIOModuleReset(gpio_base_address);
/*Enable GPIO*/
GPIOModuleEnable(gpio_base_address);
/*Configure and enable debouncing feature*/
GPIODebounceTimeConfig(gpio_base_address, 0xFF);
Vps_printf("GPIODebounceTimeConfig\n");
GPIODebounceFuncControl(gpio_base_address, gpio_pin,
GPIO_DEBOUNCE_FUNC_ENABLE);
Vps_printf("GPIODebounceFuncContro\n");
GPIOIntTypeSet(gpio_base_address, gpio_pin,GPIO_INT_TYPE_FALL_EDGE);
Vps_printf("GPIOIntTypeSet\n");
/* Set pin direction as input*/
GPIODirModeSet(gpio_base_address, gpio_pin, GPIO_DIR_INPUT);
Vps_printf("GPIODirModeSet\n");
/*Clear interrupt*/
GPIOPinIntDisable(gpio_base_address, GPIO_INT_LINE_1, gpio_pin);
Vps_printf("GPIOPinIntDisable\n");
GPIOPinIntClear(gpio_base_address, GPIO_INT_LINE_1, gpio_pin);
Vps_printf("GPIOPinIntClear\n");
/*Enable interrupt*/
GPIOPinIntEnable(gpio_base_address, GPIO_INT_LINE_1, gpio_pin);
Vps_printf("GPIOPinIntEnable\n");
return 0;
}
processor_sdk_vision_03_05_00_00\vision_sdk\links_fw\src\rtos\links_ipu\vip_capture\captureLink_drv.c
Int32 CaptureLink_drvCreateInst(CaptureLink_Obj * pObj, UInt16 instId)
{
CaptureLink_VipInstParams *pInstPrm;
CaptureLink_InstObj *pInst;
Vps_CaptCreateParams *pVipCreateArgs;
Vps_CaptVipParams *pVipPrms;
Vps_CaptVipScParams *pScParams;
Vps_CaptVipOutInfo *pVipOutPrm;
Vps_VipPortConfig *pVipPortCfg;
CaptureLink_OutParams *pOutPrm;
System_LinkChInfo *pQueChInfo;
UInt16 queId, queChId, outId;
Int32 status;
Int32 nRetVal = 0;
Fvid2_DataFormat dataFormat;
cam_intb_init(); //called gpio interrupt
But the IPU can't start.
my log:
[HOST] [HOST ] Enter Choice:
[HOST] [HOST ]
1
[HOST] [HOST ] 22.276215 s:
[HOST] [HOST ] 22.276764 s:
[HOST] [HOST ] USE_SHANGFU_PANEL_1440x810
[HOST] [HOST ] 22.276764 s: ChainsCommon_SetDctrlConfig displayType=5, displayWidth=1440,displayHeight=810 debug
[HOST] [HOST ]
[HOST] [IPU2 ] 22.276428 s: CHAINS: ChainsCommon_MultiCam_StartCaptureDevice
[HOST] [IPU2 ] 22.276550 s: status != SYSTEM_LINK_STATUS_SOK
[HOST] [IPU2 ] 22.325687 s: CAPTURE: Create in progress !!!
[HOST] [IPU2 ] 22.337034 s: Intc_IntRegister interrupt_num:52
Ths.