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.

DSP_fft16x16- Crash when I call that function twice

I'm trying to use DSP_fft16x16 function, but it only works once. Because if I call it twice I got an issue.

gen_twiddle_fft16x16(w_16x16, blksize/2);
DSP_fft16x16_i(w_16x16,blksize/2, x_16x16, y_16x16);

And I reserve memory on ARM with:

    x_16x16=C6RUN_MEM_memalign(8,blksize);
    y_16x16=C6RUN_MEM_memalign(8,blksize);
    w_16x16=C6RUN_MEM_memalign(8,blksize);   

I have several programs in C, i.e

I run those programs in ARM : main.c audio_input_output.c audio_thread.c gen_twiddle_fft16x16.c audio_process.c  and in DSP:  DSP_fft16x16.c

So I'm using c6runlib-ar and c6runlib-cc

Debug: pcm_handle before snd_pcm_open = -1092494376
Debug: pcm_handle after snd_pcm_open = -1092494376
Debug: Using 8000 Hz sampling rate.
Debug: exact_bufsize = 1024
Debug: Opened plughw:0,0
Debug: exact_bufsize = 1024
C6RUN_MEM_malloc(4096)
C6RUN_MEM_memalign(8,4096)
Entered C6RUN_MEM_init()
CMEM Debug: init: entered - ref_count 0, cmem_fd -2
CMEM Debug: init: successfully opened /dev/cmem, matching driver version...
CMEM Debug: getVersion: entered
CMEM Debug: getVersion: exiting, ioctl CMEM_IOCGETVERSION returned 0x3000000
CMEM Debug: init: ... match good (0x3000000)
CMEM Debug: init: exiting, returning success
CMEM_init() passed!
CMEM Debug: alloc: entered w/ size 0x1d00000, params - type HEAP, flags CACHED, align 0x8
CMEM Debug: allocHeap: allocated phys buffer 0x86300000
CMEM Debug: allocHeap: mmap succeeded, returning virt buffer 0x402db000
C6RUN_MEM_binBitShift = 12
C6RUN_MEM_binSize = 4096
CMEM Debug: getPhys: entered w/ addr 0x402db000
CMEM Debug: getPhys: exiting, ioctl CMEM_IOCGETPHYS succeeded, returning 0x86300000
CMEM_alloc() passed!
Leaving C6RUN_MEM_init()
Bin spanning buffer at 0x402DB008
  realigning to start of next bin at 0x402DC000
Insert - Bin: 1
  Buffer:  0x402DC000
  Pointer: 0x402DC008
C6RUN_MEM_memalign returns = 0x402DC008
C6RUN_MEM_malloc returns = 0x402DC008
Debug: Allocated input audio buffer of size 4096 to address 0x402dc008
C6RUN_MEM_malloc(4096)
C6RUN_MEM_memalign(8,4096)
Bin spanning buffer at 0x402DD010
  realigning to start of next bin at 0x402DE000
Insert - Bin: 3
  Buffer:  0x402DE000
  Pointer: 0x402DE008
C6RUN_MEM_memalign returns = 0x402DE008
C6RUN_MEM_malloc returns = 0x402DE008
Debug: Allocated output audio buffer of size 4096 to address 0x402de008
C6RUN_MEM_memalign(8,4096)
Bin spanning buffer at 0x402DF010
  realigning to start of next bin at 0x402E0000
Insert - Bin: 5
  Buffer:  0x402E0000
  Pointer: 0x402E0008
C6RUN_MEM_memalign returns = 0x402E0008
C6RUN_MEM_memalign(8,4096)
Bin spanning buffer at 0x402E1010
  realigning to start of next bin at 0x402E2000
Insert - Bin: 7
  Buffer:  0x402E2000
  Pointer: 0x402E2008
C6RUN_MEM_memalign returns = 0x402E2008
C6RUN_MEM_memalign(8,4096)
Bin spanning buffer at 0x402E3010
  realigning to start of next bin at 0x402E4000
Insert - Bin: 9
  Buffer:  0x402E4000
  Pointer: 0x402E4008
C6RUN_MEM_memalign returns = 0x402E4008
Debug: pcm_output_handle before audio_output_setup = 0
Debug: Requesting bufsize = 1024
Debug: pcm_handle before snd_pcm_open = -1092494380
Debug: pcm_handle after snd_pcm_open = -1092494380
Debug: Using 8000 Hz sampling rate.
Debug: exact_bufsize = 1024
Debug: Opened plughw:0,0
Debug: pcm_output_handle after audio_output_setup = 534952
Debug: blksize = 4096, exact_bufsize = 1024
Starting DSP...Entered C6RUN_init()
Entered C6RUN_IPC_create()
C6RUN_MEM_memalign(128,236800)
Bin spanning buffer at 0x402E5010
  realigning to start of next bin at 0x402E6000
Insert - Bin: 11
  Buffer:  0x402E6000
  Pointer: 0x402E6080
C6RUN_MEM_memalign returns = 0x402E6080
CMEM Debug: cacheWb: entered w/ addr 0x402e6080, size 0x39c90
CMEM Debug: cacheWb: exiting, ioctl CMEM_IOCCACHEWB succeeded, returning 0
PROC_setup passed!
PROC_attach passed!
PROC_load() passed!
PROC_start() passed!
LOCAL_mapToDspMMU() passed!
C6RUN_MEM_free(0x402E6080)
Remove - Bin: 11,Pointer: 0x402E6080
  Found Buffer : 0x402E6000
Leaving C6RUN_MEM_free.
MSGQ_transportOpen() passed!
Entered CONTROL_IPC_init()
CONTROL MSGQ_locate() failed! Will retry.
MSGQ_setErrorHandler() passed!
Leaving CONTROL_IPC_init()
Entered CIO_IPC_init()
Leaving CIO_IPC_init()
Leaving C6RUN_IPC_create
C6RUN_IPC_create() passed!
pthread_create() passed!
Entering CONTROL_IPC_send()
Exiting CONTROL_IPC_send()
Entered C6RUN_RPC_init()
Entered RPC_IPC_init()
RPC MSGQ_locate() failed! Will retry.
Entered CIO_IPC_recvMsg()
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
RPC MSGQ_locate() failed! Will retry.
Leaving RPC_IPC_init()
Leaving C6RUN_RPC_init()
Entering CONTROL_IPC_recv()
Exiting CONTROL_IPC_recv()
CONTROL_DSP_READY recv'd!
Leaving C6RUN_init().
Entering RPC_IPC_allocMsg()
Exiting RPC_IPC_allocMsg()
C6RUN_MEM_lookupBuffer(0x402E4008,...)
C6RUN_MEM_lookupBuffer: binNum = 9
  Found Buffer : 0x402E4000
C6RUN_MEM_lookupBuffer returns base   = 0x402E4008
C6RUN_MEM_lookupBuffer returns size   = 0x00001000
CMEM Debug: cacheWbInv: entered w/ addr 0x402e4008, size 0x1000
CMEM Debug: cacheWbInv: exiting, ioctl CMEM_IOCCACHEWBINV succeeded, returning 0
C6RUN_MEM_lookupBuffer(0x402E0008,...)
C6RUN_MEM_lookupBuffer: binNum = 5
  Found Buffer : 0x402E0000
C6RUN_MEM_lookupBuffer returns base   = 0x402E0008
C6RUN_MEM_lookupBuffer returns size   = 0x00001000
CMEM Debug: cacheWbInv: entered w/ addr 0x402e0008, size 0x1000
CMEM Debug: cacheWbInv: exiting, ioctl CMEM_IOCCACHEWBINV succeeded, returning 0
C6RUN_MEM_lookupBuffer(0x402E2008,...)
C6RUN_MEM_lookupBuffer: binNum = 7
  Found Buffer : 0x402E2000
C6RUN_MEM_lookupBuffer returns base   = 0x402E2008
C6RUN_MEM_lookupBuffer returns size   = 0x00001000
CMEM Debug: cacheWbInv: entered w/ addr 0x402e2008, size 0x1000
CMEM Debug: cacheWbInv: exiting, ioctl CMEM_IOCCACHEWBINV succeeded, returning 0
C6RUN_MEM_lookupBuffer(0x402E4008,...)
C6RUN_MEM_lookupBuffer: binNum = 9
  Found Buffer : 0x402E4000
C6RUN_MEM_lookupBuffer returns base   = 0x402E4008
C6RUN_MEM_lookupBuffer returns size   = 0x00001000
CMEM Debug: cacheInv: entered w/ addr 0x402e4008, size 0x1000
CMEM Debug: cacheInv: exiting, ioctl CMEM_IOCCACHEINV succeeded, returning 0
C6RUN_MEM_lookupBuffer(0x402E0008,...)
C6RUN_MEM_lookupBuffer: binNum = 5
  Found Buffer : 0x402E0000
C6RUN_MEM_lookupBuffer returns base   = 0x402E0008
C6RUN_MEM_lookupBuffer returns size   = 0x00001000
CMEM Debug: cacheInv: entered w/ addr 0x402e0008, size 0x1000
CMEM Debug: cacheInv: exiting, ioctl CMEM_IOCCACHEINV succeeded, returning 0
C6RUN_MEM_lookupBuffer(0x402E2008,...)
C6RUN_MEM_lookupBuffer: binNum = 7
  Found Buffer : 0x402E2000
C6RUN_MEM_lookupBuffer returns base   = 0x402E2008
C6RUN_MEM_lookupBuffer returns size   = 0x00001000
CMEM Debug: cacheInv: entered w/ addr 0x402e2008, size 0x1000
CMEM Debug: cacheInv: exiting, ioctl CMEM_IOCCACHEINV succeeded, returning 0
Entered C6RUN_RPC_dispatch()
Entering RPC_IPC_sendMsg()
Exiting RPC_IPC_sendMsg()
Entering RPC_IPC_recvMsg()
Exiting RPC_IPC_recvMsg()
Leaving C6RUN_RPC_dispatch()
Entering RPC_IPC_freeMsg()
Exiting RPC_IPC_freeMsg()
1.520081 s
Debug: Entering audio_thread_fxn processing loop... //HERE I CALLED DSP_fft16x16_i FUCTION ONCE
Entering RPC_IPC_allocMsg()
Exiting RPC_IPC_allocMsg()
C6RUN_MEM_lookupBuffer(0x402E4008,...)
C6RUN_MEM_lookupBuffer: binNum = 9
LOCAL_getBuf() failed because no magic number found:
  pBuffer        = 0x402E4000
  ptr            = 0x402E4008
  ptr[-1]        = 0x129CDE9B
  ptr[-2]        = 0x1A09294D
C6RUN_MEM_lookupBuffer: pBuf lookup failed.
Entered C6RUN_exit().
Entering CONTROL_IPC_send()
Exiting CONTROL_IPC_send()
Entering CONTROL_IPC_recv()
Leaving CIO_IPC_recvMsg()
A CIO message was received.
Entering CIO_IPC_sendMsg()
Exiting CIO_IPC_sendMsg()
Exiting CONTROL_IPC_recv()
CONTROL_DSP_FINISHED was received.
Entered C6RUN_RPC_exit()
Entered RPC_IPC_exit()
MSGQ_release() passed.
MSGQ_close() passed.
Leaving RPC_IPC_exit()
Leaving C6RUN_RPC_exit()
Completed shutdown of CIO thread.
Entered C6RUN_IPC_delete()
MSGQ_setErrorHandler() passed.
Entered CIO_IPC_exit()
MSGQ_release() passed.
MSGQ_close() passed.
Leaving CIO_IPC_exit()
Entered CONTROL_IPC_exit()
MSGQ_release() passed.
MSGQ_close() passed.
Leaving CONTROL_IPC_exit()
MSGQ_transportClose() passed.
PROC_stop() passed.
POOL_close() passed.
PROC_detach() passed.
PROC_destroy() passed.
Leaving CONTROL_IPC_delete()
Leaving C6RUN_exit().
Entered C6RUN_MEM_exit()
Orphaned memory at bin 1, 0x402DC008.
Orphaned memory at bin 3, 0x402DE008.
Orphaned memory at bin 5, 0x402E0008.
Orphaned memory at bin 7, 0x402E2008.
LOCAL_getBuf() failed because no magic number found:
  pBuffer        = 0x402E2000
  ptr            = 0x402E2008
  ptr[-1]        = 0xEB192147
  ptr[-2]        = 0xFDB5FFE2
Signal 11 received! Aborting...

  • Hi Marcelo,

    Could you specify which software release you are using? It will be helpful for more detailed analyzing of the problem.

  • Cvetolin Shulev-XID said:

    Hi Marcelo,

    Could you specify which software release you are using? It will be helpful for more detailed analyzing of the problem.

    dsplib=3_1_0_0

    ti_cgt_c6000_7.2.2

    C6Run_0_97_03_03

    # Components used for DSPLink & Bios5 based platforms
    DSPLINK_VERSION=1_65_00_03
    LPM_VERSION=1_24_02_09
    BIOS_VERSION=5_41_10_36

    # Common components used for all platforms
    XDCTOOLS_VERSION=3_20_08_88
    LINUXUTILS_VERSION=2_25_05_11

    For your information I've used DSP_fir_gen function and it works great.

    Thx for your help.