Part Number: TMS320C6657
I am using the TCP3D decoder on a C6657 EVM. I have pdk_c665x_2_0_14 and edma3_lld_2_12_05_30E. Started with the C6657 example found here:
C:\ti\pdk_c665x_2_0_14\packages\ti\drv\tcp3d\example
I then copied the source files into my project and I was able to test LTE Turbo Decodes successfully. I wanted to then clean up my project and I tried to use the EDMA3 versions of several files but I can not get the EDMA initialization to succeed. The files in particular are the sample*.* files.
sample.h
sample_cfg.c
sample_cs.c
sample_init.c
sample_int_reg.c
These files exist in the example folder
C:\ti\pdk_c665x_2_0_14\packages\ti\drv\tcp3d\example\src
but also exist in the EDMA3 folder
C:\ti\edma3_lld_2_12_05_30E\packages\ti\sdo\edma3\drv\sample\src
So, I figured I could just include the EDMA3 package and not have to have copies of those files in my source code also.
However, as mentioned above I can't seem to get this to work. What is interesting is that it seems like the files used in the example shouldn't work. The root of the problem seems to the related to the sample_cfg.c file. The file provided in the example, defines 3 EDMA instances. The C6657 only have 1 EDMA instance. The example code uses Instance #2 and Region #3. Again, this seems work. The equivalent file provided by the EDMA3 driver is sample_c6657_cfg.c. It correctly defines only one EDMA instance as expected. So, I had this idea that maybe the Instance #2 and Region #3 data from sample.cfg was the same as Instance #0 Region #3 from sample_c6657_cfg.c. But, that is not true. In fact, I don't see any 1-1 mapping between the two.
Another issue is the function edma3init(). In the example code it is provided in sample_init.c and has the following header,
EDMA3_DRV_Handle edma3init (unsigned int edma3Id, EDMA3_DRV_Result *errorCode,
unsigned int dspCoreID, unsigned int tpccRegionUsed)
In the EDMA3 driver code, also in sample_init.c the same function has a different definition
EDMA3_DRV_Handle edma3init (uint32_t edma3Id, EDMA3_DRV_Result *errorCode)
In the example code the tpccRegionUsed param is used to select the region. In the driver code there is no tpccRegionUsed param and the dsp core ID is read and used to select the region.
I changed to use the two parameter version but then things failed in the EDMA setup. Particularly in the DMA channel allocation. The TCP3 code wants to use channels 0,1 but the EDMA3 driver code thinks those are not valid. If you change the code to 40/41 instead, it will allocate those, but then the EDMA driver fails again trying to initialize the interrupts.
So, at this point I guess I've kinda given up. The setup for EDMA and TCP is complicated enough that without a full understanding it is really hard to debug.
If you have any suggestions I'd like to hear them, but I guess for now I am going to revert back to including the seemingly wrong example code in my project.
Thanks,
Chris