Other Parts Discussed in Thread: TFP410
I am trying to use DssApp example from PDK
In this project procedure "Fvid2_create" try open driver for display controller:
//---------------------------------------------------------------------------------------------------------------------
printf( ": System Init norm -> Fvid2 create...\r\n" );
// Create DCTRL handle, used for common driver configuration
appObj->dctrlHandle = Fvid2_create(
FVID2_VPS_DCTRL_DRV,
VPS_DCTRL_INST_0,
NULL, // NULL for VPS_DCTRL_INST_0
NULL, // NULL for VPS_DCTRL_INST_0
NULL); // NULL for VPS_DCTRL_INST_0
//---------------------------------------------------------------------------------------------------------------------
but fails because of no proper gFdmObj.fdmDriverObjects[...] element inside Fvid2_create procedure:
//---------------------------------------------------------------------------------------------------------------------
Fvid2_Handle Fvid2_create(UInt32 drvId,
UInt32 instanceId,
Ptr createArgs,
Ptr createStatusArgs,
const Fvid2_CbParams *cbParams )
{
Fdm_Driver *drv = NULL;
UInt32 cnt;
Fdrv_Handle drvHandle = NULL;
Fdm_Channel *channel = NULL;
Fvid2_DrvCbParams fdmCbParams, *tempCbParams;
gFdmObj.fdmDriverObjects[5].isUsed = 1;
gFdmObj.fdmDriverObjects[5].drvOps->drvId = drvId;
BspOsal_semWait( gFdmObj.lockSem, BSP_OSAL_WAIT_FOREVER );
printf("Fvid2_create : Getting the matching driver object from %d one... \n\n", FVID2_CFG_FDM_NUM_DRV_OBJS );
for( cnt = 0u; cnt < FVID2_CFG_FDM_NUM_DRV_OBJS; cnt++ )
{
printf("No:%2d, IsUsed:%d, DriverID:0x%4X - ", cnt, gFdmObj.fdmDriverObjects[cnt].isUsed, gFdmObj.fdmDriverObjects[cnt].drvOps->drvId );
if( TRUE == gFdmObj.fdmDriverObjects[cnt].isUsed )
{
if( gFdmObj.fdmDriverObjects[cnt].drvOps == NULL ) printf("Fvid2_create : [%d].drvOps is NULL !!!\n", cnt );
if( drvId == gFdmObj.fdmDriverObjects[cnt].drvOps->drvId )
{
drv = &gFdmObj.fdmDriverObjects[cnt];
// Allocate channel object
printf("ID is right! Try to fdmAllocChannelObject");
channel = fdmAllocChannelObject(); break;
} else printf("wrong ID");
} else printf("No Use...");
printf("\n");
}
//---------------------------------------------------------------------------------------------------------------------
The program prints:
//---------------------------------------------------------------------------------------------------------------------
Build time : [18:07:29 Feb 14 2018]
FVID2 Version : [FVID_02_01_00_01]
BSP Version : [PDK_01_08_00_xx]
: System Init done.
: System Init norm -> Fvid2 create...
Fvid2_create : Getting the matching driver object from 40 one...
No: 0, IsUsed:1, DriverID:0x 400 - wrong ID
No: 1, IsUsed:1, DriverID:0x 100 - wrong ID
No: 2, IsUsed:1, DriverID:0x 302 - wrong ID
No: 3, IsUsed:1, DriverID:0x1300 - wrong ID
No: 4, IsUsed:1, DriverID:0x1100 - wrong ID
No: 5, IsUsed:0, DriverID:0x 0 - No Use...
No: 6, IsUsed:0, DriverID:0x 0 - No Use...
No: 7, IsUsed:0, DriverID:0x 0 - No Use...
No: 8, IsUsed:0, DriverID:0x 0 - No Use...
No: 9, IsUsed:0, DriverID:0x 0 - No Use...
No:10, IsUsed:0, DriverID:0x 0 - No Use...
No:11, IsUsed:0, DriverID:0x 0 - No Use...
No:12, IsUsed:0, DriverID:0x 0 - No Use...
No:13, IsUsed:0, DriverID:0x 0 - No Use...
No:14, IsUsed:0, DriverID:0x 0 - No Use...
No:15, IsUsed:0, DriverID:0x 0 - No Use...
No:16, IsUsed:0, DriverID:0x 0 - No Use...
No:17, IsUsed:0, DriverID:0x 0 - No Use...
No:18, IsUsed:0, DriverID:0x 0 - No Use...
No:19, IsUsed:0, DriverID:0x 0 - No Use...
No:20, IsUsed:0, DriverID:0x 0 - No Use...
No:21, IsUsed:0, DriverID:0x 0 - No Use...
No:22, IsUsed:0, DriverID:0x 0 - No Use...
No:23, IsUsed:0, DriverID:0x 0 - No Use...
No:24, IsUsed:0, DriverID:0x 0 - No Use...
No:25, IsUsed:0, DriverID:0x 0 - No Use...
No:26, IsUsed:0, DriverID:0x 0 - No Use...
No:27, IsUsed:0, DriverID:0x 0 - No Use...
No:28, IsUsed:0, DriverID:0x 0 - No Use...
No:29, IsUsed:0, DriverID:0x 0 - No Use...
No:30, IsUsed:0, DriverID:0x 0 - No Use...
No:31, IsUsed:0, DriverID:0x 0 - No Use...
No:32, IsUsed:0, DriverID:0x 0 - No Use...
No:33, IsUsed:0, DriverID:0x 0 - No Use...
No:34, IsUsed:0, DriverID:0x 0 - No Use...
No:35, IsUsed:0, DriverID:0x 0 - No Use...
No:36, IsUsed:0, DriverID:0x 0 - No Use...
No:37, IsUsed:0, DriverID:0x 0 - No Use...
No:38, IsUsed:0, DriverID:0x 0 - No Use...
No:39, IsUsed:0, DriverID:0x 0 - No Use...
EALLOC: Invalid driver ID!!
//---------------------------------------------------------------------------------------------------------------------
So you can see no proper driver for FVID2_VPS_DCTRL_DRV, and no creation new one for it
//---------------------------------------------------------------------------------------------------------------------
I have couple of question:
1) How workaround this?
2) Where global value "gFdmObj" is initiated? I search all PDK - no assignments in PDK.
I attached CCS7 project to rewiev code.