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/BIOS Link, but no codec engine... :)

Other Parts Discussed in Thread: CCSTUDIO

We're using a DM6446 for general purpose signal demodulation.  Our application doesn't really fit in the Codec Engine flow.  We need to call various DSP functions like equalize, and agc, and so on from our ARM side.  We have our own board in hand now, and I'm trying to get the DSP/BIOS Link code up and running on the target.  I've tried to run samples as well as my own code and have had trouble.  Maybe I've missed something obvious. We're running MVL4.0.1 with DSPLink_1_51 and bios_5_31_08.  We were going to move up to MVL5.0 but it meant rewriting some drivers we'd already finished, so we didn't.

When I run the scale sample, it never returns from MSGQ_locate() unless I specify a different timeout that WAIT_FOREVER.

/*   in scale.c... the gpp side.
     *  Locate the DSP's message queue
     */
    syncLocateAttrs.timeout = WAIT_NONE;

    while ((status == DSP_ENOTFOUND) || (status == DSP_ENOTREADY)) {
       
        status = MSGQ_locate (SampleDspMsgqName, &SampleDspMsgq, &syncLocateAttrs) ;
        SCALE_Sleep (100000);
       
        if ((status == DSP_ENOTFOUND) || (status == DSP_ENOTREADY)) {
            SCALE_Sleep (100000) ;
        }
        else if (DSP_FAILED (status)) {
            SCALE_1Print ("MSGQ_locate () failed. Status = [0x%x]\n", status) ;
        }
    }

 

So my gpp-side app hangs and on my console output, I get the following assertion failure...

root@target:/opt/dsplink/samples/scale/debug# Assertion failed (mpBuf->totalBuffers == mpBuf->freeBuffers). File : ../../POOLS/Davinci/mpbuf.c Line : 380

 

I've insmoded dsplinkk.ko and cmemk.ko as follows...

 

insmod dsplinkk.ko
mknod /dev/dsplink c 230 0

insmod cmemk.ko phys_start=0x87400000 phys_end=0x87500000 pools=40x4096

 

As I've been reading the forums, I thought it might be our memory map.  But now I'm not so sure.  Our Linux kernel is 112 MB, 0x8000000 up to 0x83FFFFFF, which is smaller than the default kernel.  We have 256 MB of RAM on the board.  When I cat /proc/iomem and /proc/cmem I get...

root@target:/opt/dsplink/samples/scale/debug# cat /proc/iomem
01c64000-01c645ff : musb_hdrc
01c66800-01c67000 : dm_spi.0
01e10000-01e103ff : mmc.0
  01e10000-01e103ff : mmc
04000000-0401ffff : fpga
80000000-873fffff : System RAM
  80034000-8028270f : Kernel text
  80284000-802fb45f : Kernel data
e1080000-e10847ff : eth0
root@target:/opt/dsplink/samples/scale/debug# cat /proc/cmem
Pool 0: 40 bufs size 4096 (4096 requested)

Pool 0 busy bufs:

Pool 0 free bufs:
id 0: phys addr 0x874ff000
id 1: phys addr 0x874fe000
id 2: phys addr 0x874fd000
id 3: phys addr 0x874fc000
id 4: phys addr 0x874fb000
id 5: phys addr 0x874fa000
id 6: phys addr 0x874f9000
id 7: phys addr 0x874f8000
id 8: phys addr 0x874f7000
id 9: phys addr 0x874f6000
id 10: phys addr 0x874f5000
id 11: phys addr 0x874f4000
id 12: phys addr 0x874f3000
id 13: phys addr 0x874f2000
id 14: phys addr 0x874f1000
id 15: phys addr 0x874f0000
id 16: phys addr 0x874ef000
id 17: phys addr 0x874ee000
id 18: phys addr 0x874ed000
id 19: phys addr 0x874ec000
id 20: phys addr 0x874eb000
id 21: phys addr 0x874ea000
id 22: phys addr 0x874e9000
id 23: phys addr 0x874e8000
id 24: phys addr 0x874e7000
id 25: phys addr 0x874e6000
id 26: phys addr 0x874e5000
id 27: phys addr 0x874e4000
id 28: phys addr 0x874e3000
id 29: phys addr 0x874e2000
id 30: phys addr 0x874e1000
id 31: phys addr 0x874e0000
id 32: phys addr 0x874df000
id 33: phys addr 0x874de000
id 34: phys addr 0x874dd000
id 35: phys addr 0x874dc000
id 36: phys addr 0x874db000
id 37: phys addr 0x874da000
id 38: phys addr 0x874d9000
id 39: phys addr 0x874d8000

Can anyone shed some light on this one for me?  i.e. what would cause it to wait forever on MSGQ_locate()  ???????  Thanks everybody.

 

  • Also, when I modify the code a little bit and put WAIT_NONE and loop a few times trying to MSGQ_locate() over and over, I get 0x80008051 (DSP_NOTDONE) and then I start to get 0x8000800C or DSP_EMEMORY.  Maybe that's useful info.

  • DSPLN00000911  MSGQ_locate on dsp side hangs intermittently or doesn't locate
    the specified msgq name some times

    Description :
    MSGQ_locate on dsp side hangs intemittently or doesn't locate the specified msgq
    name some times on both DEBUG and RELEASE (whole_program ) build modes
    only for Bios 6.xx.
    The MSGQ_locate() stress tests also failed.

    Workaround:
    None.

     

    Niiice.  Hmmm, I'm using bios 5.31, but I have 6.xx elsewhere.  I wonder if paths got crossed up.

     

  • Hmmm.  Found some notes in the InstallGuide about bios 5_32_03 and cgtools 6.0.14.  I was on 5_31_08 and 6_0_15.  I switched, and now MSGQ_locate succeeds.  That's good news. 

    Pool_close() seems to fail with status 0x80008000 now.

     

    Entered MSGQ_transportClose ()
            procId  [0x0]

    Failure: Status:[0x80008002] File:[0x202] Line:[195]
    Leaving MSGQ_transportClose ()  status [0x80008002]
    Entered PROC_stop ()
            procId  [0x0]

    Failure: Status:[0x80008002] File:[0x200] Line:[1145]
    Leaving PROC_stop ()    status [0x80008002]
    Entered POOL_close ()
            poolId  [0x0]

    Failure: Status:[0x80008000] File:[0x203] Line:[194]
    Leaving POOL_close ()   status [0x80008000]
    Entered POOL_close ()
            poolId  [0x1]

    Failure: Status:[0x80008000] File:[0x203] Line:[194]
    Leaving POOL_close ()   status [0x80008000]
    Entered POOL_close ()
            poolId  [0x2]

  • Good news.  I've gotten DSP/BIOS Link to properly locate MSG Queues and to transfer data and return values.  The initial bug was apparently a compatibility problem between BIOS, and DSPLink.  (Matching versions.)

     

    I still get the Pool_close() failures, and I'm not sure why.  I get them with my app as well as with the samples apps.  :(  I get the following error when it happens...

    Assertion failed (mpBuf->totalBuffers == mpBuf->freeBuffers). File : ../../POOLS/Davinci/mpbuf.c Line : 380

    Anyone know anything about that????

     

  • hi FastFourier,

    I got the very similar issue: The MSGQ_locate just hangs and I couldn't locate what the issue is.

    You pointed out a very good solution.

    My CCS just got BIOS version  5.31.03 and 5.31.02

    cgtools got: 6.08 and 6.0.13

    I tried all combinations but no one worked.

    Is it possible to download new versions of DSP/BIOS and cgtools to upgrade my current CCS?

    I see there is an upgrade pack at

    http://focus.ti.com/docs/toolsw/folders/print/ccstudio.html?CMP=KNC-GoogleTI&247SEM

    for 30-Day Evaluation

    I wanna give it a try, but worry if this pack will ruin my current CCS.

    Any suggestions would be appreciated.

     

  • For me, it was matching the right version of DSP/Bios with the right version of DSPLink that fixed the problem.  I installed the following...

    DVSDK_1_30_01_41

    DSPLINK_1_51

    BIOS_5_32_04

    cg6x_6_0_14

    That combination seems to work for me.  I'm assuming there are newer versions that are compatible, but I had trouble porting some of our old MontaVista 4 code to MontaVista 5, so I just stayed with these versions.

    FYI, I don't build any of it from Code Composer.  I just do it all from Linux command line.

  • Mike Yue said:
    Is it possible to download new versions of DSP/BIOS and cgtools to upgrade my current CCS?

    Yes, it is. For CGT please see:

    https://www-a.ti.com/downloads/sds_support/TICodegenerationTools/download.htm

    For DSP/BIOS please see:

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/index.html

    you will need a ti.com ID.

  • Here's an article discussing the exact procedure for updating the compiler.

  • Hi FastFourier,

    Is it possible to share you downloaded BIOS_5_32_04? or, can you point me out where to find this version BIOS? (I need the windows version. You may use yousendit.com and send it to myue@qnx.com)

    Many thanks!

     

    I downloaded cg6x_6_0_14(the file name is ti_cgt_c6000_6.0.14_setup_win32.exe), and some newer version cgtools

    Also, I download some DSP/BIOS including BIOS_5_33_06 and BIOS_5_41_00_06, but nowhere to find BIOS_5_32_04

    With combination cg6x_6_0_14 & BIOS_5_33_06, I can build up my DSP project, but the MSGQ_Locate issue is still there.

    For all other combinations there was a memory about "opt6x.exe experienced a segmentation fault while processing function xxx()...", and I was told to contact customer support  - I just don't want to.

    Thanks

    Mike

     

  • Thanks Mariana