Tool/software: TI-RTOS
Hello everyone
I'm still having problems bringing EDMA into life. My code looks like:
static unsigned int edma3InstanceId = 0, edma3RegionId = 1; extern EDMA3_DRV_GblConfigParams sampleEdma3GblCfgParams[]; // Also tried: extern EDMA3_DRV_GblConfigParams sampleEdma3GblCfgParams; extern EDMA3_DRV_InstanceInitConfig sampleInstInitConfig[][EDMA3_MAX_REGIONS]; // also tried: extern EDMA3_DRV_InstanceInitConfig sampleInstInitConfig;
// And in the same source file: void edma_config(EDMA_T *EdmaObj) { EDMA3_DRV_Result edma3Result = EDMA3_DRV_SOK; // Set global config to defaults in sample Params (located in bios_edma3_drv_sample_C6455_cfg.c) EDMA3_DRV_GblConfigParams *globalConfig = &sampleEdma3GblCfgParams; // + edma3InstanceId; // Used in DRV_create() function to specify master/slave EDMA3_DRV_MiscParam miscParam; // Used for EDMA3_DRV_open() API and initCfg structure, defined in <edma3_drv.h> EDMA3_DRV_InitConfig initCfg; // Located in bios_edma3_drv_sample_C6455_cfg.c EDMA3_DRV_InstanceInitConfig *instanceConfig = &sampleInstInitConfig; // [edma3InstanceId] + edma3RegionId; // Declare Config structure used to initialize the Driver Instance (needed by DRV_open) initCfg.isMaster = TRUE; initCfg.regionId = edma3RegionId; // User must specify region (LLD/DRV does not support "global" region) initCfg.drvSemHandle = (void*)&os_sem; // Os_sem create in semaphore.c initCfg.drvInstInitConfig = instanceConfig; // Device-specific configuration - resources owned by region edma3regionId initCfg.gblerrCb = NULL; // Callback function to catch channel controller errors such as TCC error, // queue threshold exceeded, etc. initCfg.gblerrData = NULL; // any data required by the error callback function miscParam.isSlave = FALSE; // ARM + DSP, specify who is the master, single-chip = use FALSE // EDMA3 Driver Create (called only once for each EDMA3 hardware instance) edma3Result = EDMA3_DRV_create( edma3InstanceId, globalConfig, (void *)&miscParam ); if( edma3Result != EDMA3_DRV_SOK ) { Log_info0( "e@edma_config:EDMA3_DRV_create()" ); return; } }
The return value is not EDMA3_DRV_SOK . the context ma matter, so here goes a zip of the whole project (CCS7.3, pdk_2_0_7, edma3_lld_2_12_05_29):
I've made same clean up in main.c, so only the edma3 functionality remains, but some more source files are there.
If anyone has a tip, it will be very helpful to me.
Kind regards,
Pablo