This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/AM5728: Trouble with FFTLIB example project

Part Number: AM5728
Other Parts Discussed in Thread: FFTLIB, SYSBIOS,

Tool/software: TI-RTOS


I'm having trouble getting the fft_sp1d_r2c_k1_66_LE_ELF example project to run properly. I'm using processor_sdk_rtos_am57xx_5_01_00_11 and fftlib_c66x_2_0_0_2.

My problem is in the EdmaMgr_alloc function. In line 1038 of the iresman_edma3Chan.c file, it is failing the EDMA3_allocResource function and setting *status = IRES_ENORESOURCE causing an error message "EdmaMgr_alloc() failed (0)" to occur.

Any help on why I'm receiving this error would be greatly appreciated!



  • Hi,

    The FFTLIB support engineer is out of office and will be back around end of the year.

    I downloaded for the K1 device. Is this the package you used? I tried to build, the ti\fftlib_c66x_2_0_0_2\packages\ti\fftlib\src\fft_dp_1d_r2c\k1\fft_dp_1d_r2c_k1_66_LE_ELF, it seems that it used very old packages as specified in .cproject:

    <listOptionValue builtIn="false" value="RTSC_PRODUCTS=com.ti.biosmcsdk.pdk.C6678L:;com.ti.rtsc.SYSBIOS:;com.ti.sdo.edma3:2.11.11;com.ti.rtsc.XDAIS:;ti.mas.dsplib.c66x:;com.ti.rtsc.FrameworkComponents:;"/>

    I can't find many of them. Do you use the above packages or something much newer?

    You mentioned "processor_sdk_rtos_am57xx_5_01_00_11", how the FFTLIB is related to RTOS SDK AM57? I thought the FFTLIB is a standalone algorithm package you can run on any C66x DSP core?

    Also you mentioned "iresman_edma3Chan.c"====> I believe this is part of EDMA LLD package file, do you use EDMA 2.11.11 release as the FFTLIB tested?

    Regards, Eric
  • Hi Eric,

    Thanks for taking a look at my problem. I am indeed using the download for the K1 device you linked. I do not have the requested versions of the DSPLIB C66x or the EDMA3 package 2.11.11(using 2.11.5). I've tried using more recent versions, but it didn't resolve my issue either. At the moment, I'm not associating the FFTLIB with the RTOS SDK AM57 package, but we would like to utilize it in our project once we can get it working properly.

    The iresman_edma3Chan.c file is actually a part of the framework_components package of which I'm using version

    It looks like some of my trouble is coming from re-configuring the project to work with the DSP core on the AM5728 instead of the C6678. I've modified fft_c6678_config.c to show the following:

    // I believe the AM5728 only has the one EDMA DSP instance according to the TRM
    #define NUM_EDMA_INSTANCES 1
    // Changed register addresses of edmaMgrGblConfigParams EDMA3 Instance# 0 to match the AM5728 locations
    /** Global Register Region of CC Registers */
    (void *)0x40D10000u, //0x02700000u,
    /** Transfer Controller (TC) Registers */
    (void *)0x40D05000u, //0x02760000u,
    (void *)0x40D06000u, //0x02768000u,

    After those changes, it's now failing at the EdmaMgr_init() function with "[C66xx_DSP1] EdmaMgr_init() return error! (0)".

    Thanks again,

  • I was also wondering if the example code for the AM5728 mentioned in this thread would be available for us to review?

  • Hi,

    >>>>>this thread>>>> You meant:

    I saw there is a discussion of "We have an addon library called very large FFT for C66x that was created for usecases that require FFT of upto 1024 K samples which you can download from here", is this what you are looking for?

    I followed the link, it is I thought you have this already?

    Regards, Eric
  • Hi,

    Also, you tried to change EDMA CC and TC base address from C6678 to AM57x C66 core, try if below base address work for you:

    #define DSP1_EDMA3_CC_BASE_ADDR (0x01D10000)
    #define DSP1_EDMA3_TC0_BASE_ADDR (0x01D05000)
    #define DSP1_EDMA3_TC1_BASE_ADDR (0x01D06000)

    Regards, Eric
  • Hi Eric,

    I did try changing the EDMA3 base address but it did not solve the problem.

    At the end of the reply of the other thread Rahul mentioned "FFTLIB is supported on AM572x but the original VLFFT demo was created using C6678 using older software baseline. If you are interested in the demo code, we may be able to provide that as reference." I wasn't sure if that demo code was already configured for AM5728 or was something different not available in the package examples?



  • John,

    VLFFT is no longer supported, and not ported to AM5728 either.

    Would it possible to upload your project here so we try to reproduce your issue with all your code changes and same dependent software components?

  • Hi Eric,

    I just double checked and wanted to clarify what we tried. I'm pretty sure those #define's you shared are from the edma3_lld library, but the fftlib project appears to use the edma3 library in the framework_components_3_30_00_06 library. There's a file included in the fftlib example project "fft_c6678_config.c", and I went into the EDMA3_GblConfigParams edmaMgrGblConfigParams section and changed the base address there. I've originally tried the EDMA instance values (0x40D10000, 0x40D05000, and 0x40D06000)  and not the private EDMA instance values you shared. But now when I'm trying to test out the EdmaMgr_init function again, it is giving me another error:

    [t=0x0001aea7] ti.sysbios.heaps.HeapMem: ERROR: line 174: assertion failure: A_heapSize: Requested heap size is too small
    ti.sysbios.heaps.HeapMem: line 174: assertion failure: A_heapSize: Requested heap size is too small

    Tracking down the issue took me to the EdmaMgr_heap_create() function in edmamgr_heap.c of the framework_components edmamgr library. It shows: #define EdmaMgr_HEAP_SIZE  0x1500 but I'm not sure how to rebuild that library if I try to make changes to it.

    Thanks again,