Tool/software: TI-RTOS
I’m working on a C6678 DSP multi-core embedded project and I'm trying to get our DMA Library working. It uses the TI EDMA3 library (edma3_lld_02_12_01_22). Our code is crashing during initialization. We call EDMA3_DRV_create() without any problems but when we call EDMA3_DRV_open() we crash. I’ve been able to step into the code and it is crashing in edma3resmgr.c, in the EDMA3_RM_allocResource() routine, on line 1138 when it calls:
/**
* Take the instance specific semaphore, to prevent simultaneous
* access to the shared resources.
*/
semResult = edma3OsSemTake(rmInstance->initParam.rmSemHandle,
EDMA3_OSSEM_NO_TIMEOUT);
The rmSemHandle was created by our code earlier like this:
/*
** Create DMA DRV semaphores
*/
Error_init (&eb);
Semaphore_Params_init (&semParams);
semParams.mode = Semaphore_Mode_COUNTING;
dma_drv_sema4 = Semaphore_create (1, &semParams, &eb);
This semaphore passed into the structure. I verified that the address is getting passed down correctly so I don’t know why the call to edma3OsSemTake would crash. I have some source for that routine but the debugger won’t let me step through it, only the disassembly. It seems to crash on the second assembly instruction.
In all of the TI examples, initialization is done by calling edma3init(), which is in the “sample library”, called edma3_lld_drv_sample.ae66. But if I try to include this library into our project, I get lots of duplicate symbols defined conflicting with platform_lib (ti.platform.evm6678l.ae66) which I must include for other things.
I've seen the source for ema3init() and it calls edma3OsSemCreate() to create the semaphore. I've also seen source for edma3OsSemCreate() and all it does is call Semaphore_create(). But maybe this is not the actual source? My only guess is that edma3OsSemCreate does something other than just call Semaphore_create() which I am not doing and edma3OsSemTake() is expecting.
Not sure how to resolve this.