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.

CCS/CCSTUDIO: CSL import on a DSP-BIOS project

Part Number: CCSTUDIO

Tool/software: Code Composer Studio

Hi there,

I correctly tested the CSL USB CDC example and now I want to import that module on my project using DSP-Bios.

I can't let it work and the problem seems to be on the interrupt vector allocation.

if I comment the line "IRQ_setVecs((Uint32)(&VECSTART));" the dsp-bios works but the USB driver doesn't.

If I use the function IRQ_setVecs((Uint32)(&VECSTART)) the DSP-bios doesn' work.

I noticed that on the CSL example the vector location has a different address compared to the one defined by dsp-bios.

How can I use CSL with dsp-bios on this application?

Where can I find examples with CSL used on DSP -Bios?

I already used CSL UART on a dsp-bios project and there I have no problem!

Thank you

Stefano 

  • What device are you using? BIOS manages the vector table so you need to create/plug the vectors via the HWI module.

    Todd
  • I'm using C5515. Could you explain more in detail what I should do?

    Thank you
    Stefano
  • Some more details:

    Running with: CCS5, c55_csl_3.04, C5515 EVM, DSP BIOS 5.41.11.38

    I configured through HWI dsp bios module the USB interrupt as follow:

    I then modified the csl_usb_cdc_example.c code commenting the vector table inizialization done by the CSL USB example:

    /* Set the interrupt vector start address */
    //IRQ_setVecs((Uint32)(&VECSTART));

    /* Plug the USB Isr into vector table */
    //config.funcAddr = &usb_isr;
    //IRQ_plug(USB_EVENT, config.funcAddr);

    /* Enable USB Interrupts */
    IRQ_enable(USB_EVENT);
    /* Enable CPU Interrupts */
    IRQ_globalEnable();

    The USB interrupt seems enabled:

    but the the CSL module still get an error and the  CDC_Open function gets an error ("CDC Open Failed\n"); 

    // Set up USB configuration strucrure
    usbConfig.opMode = CSL_USB_OPMODE_POLLED;
    usbConfig.maxCurrent = CSL_USB_MAX_CURRENT;
    usbConfig.appSuspendCallBack = (CSL_USB_APP_CALLBACK)CSL_suspendCallBack;
    usbConfig.appWakeupCallBack = (CSL_USB_APP_CALLBACK)CSL_selfWakeupCallBack;
    usbConfig.startTransferCallback = CSL_startTransferCallback;
    usbConfig.completeTransferCallback = CSL_completeTransferCallback;

    // Create a CDC handle
    status = CDC_Open(&CDC_AppHandle, &usbConfig);
    if(status != CSL_SOK)
    {
    if(status == CSL_ESYS_BADHANDLE)
    {
    CSL_USB_DEBUG_PRINT("Opening CDC Module Failed!\n");
    CSL_USB_DEBUG_PRINT("CDC_Open Returned - BAD HANDLE\n");
    } else
    {
    CSL_USB_DEBUG_PRINT("CDC Open Failed\n");
    }

    return(status);
    }
    else
    {
    CSL_USB_DEBUG_PRINT("CSL CDC Module Open Successful\n");
    }

    How am I supposed to configure and manage interrupts with DSP-Bios when I use CSL?

  • I think the main problem with what you've done so far is that the usb_isr() function is declared with the 'interrupt' keyword:

    interrupt void usb_isr(void)

    That keyword messes up the HWI dispatcher handling of the ISR and can't be used by an HWI-dispatched ISR.

    The other thing that might cause problems is the IRQ_globalEnable() call.  BIOS will globally enable interrupts at the appropriate time, which happens once main() returns.

    So, please try removing the 'interrupt' keyword, and comment-out the IRQ_globalEnable() call.

    There is a way to allow use of the 'interrupt' keyword on ISRs, which requires the ISR to *not* be dispatched by HWI, and requires a run-time HWI_plug() call instead of statically configuring HWI_INT20 in gconf.  However, I would not recommend this method but will explain in more detail if you'd like to pursue it.

    Regards,

    - Rob