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.

tms320c5505 ezdsp kit

hai i have been using the above mentioned kit and i was unable to work with the interrupt using the csl and when i add vector.asm & irqplug.asm it gives error message ,please help us how to work with the interrupt using csl . i would like to know how to use fft hardware acclerator .

  • Hi Seeni;

    Let me clarify a little bit, you have two separate issues as following:

    1. How to make interrupt work?

    2. How to use FFT ?

    Correct?

    For #1, which CCS version do you use? 3.3 or 4.x. Which interrupt do you want to use? or anyone of them.

    Please let us know.

    Thanks

    Wen

  • For how to use the hardware based FFT, please take a look at following app-notes. This notes explains very well, it should help you.

    http://focus.ti.com/dsp/docs/litabsmultiplefilelist.tsp?sectionId=3&tabId=409&literatureNumber=sprabb6a&docCategoryId=1&familyId=325

    Let me know if you cannot download the PDF, I can send it to you.

    Regards

    Wen

  • hai wen , i am using the ccs v4.x and i using csl for timer interrupt provided with the ezdsp c5505 tool kit

  • You must provide some more specific information. Now we can only guess what is wrong, because we don't know ANY symptoms. At least, what is content of errors?

     

    regards

    MS

  • Following is a simple interrupt service routine, but it has been verified working. The interrupt service routine convention is the same, you can write one based on this.

    Regards

    Wen

     

    //////////////////////////////////////////////////////////////////////////////////////////////

    //interrupt service routine for the external wakeup input on the pin

    ///////////////////////////////////////////////////////////////////////////////////////////////

    interrupt void rtc_isr (void)

    {

      wakeup_counter++; //for debugging use

      //Important: write "1" to clear the just occured EXT-wakeup interrupt flag

      //so the next interrupt event can be seen by CPU

      *(ioport volatile unsigned int *)RTCINTFL = 0x0020;

    }

  • this is my timer program that i am using provided in the csl provide me the vector.asm file for this program

     

    /*  ============================================================================
     *   Copyright (c) Texas Instruments Inc 2002, 2003, 2004, 2005, 2008
     *
     *   Use of this software is controlled by the terms and conditions found in the
     *   license agreement under which this software has been supplied.
     *  ============================================================================
     */

    /** @file csl_gpt_example.c
     *
     *  @brief I2S functional layer sample source file
     *
     *  Path: \(CSLPATH)/example/gpt
     */

    /* ============================================================================
     * Revision History
     * ================
     * 05-Oct-2008 Created
     * ============================================================================
     */

    #include "csl_gpt.h"
    #include "csl_intc.h"
    #include <stdio.h>

    #define CSL_TEST_FAILED         (1)
    #define CSL_TEST_PASSED         (0)
    extern void VECSTART(void);
    CSL_GptObj  gptObj;
    Uint16   hitIsr;


    /*
     This is interrupt sub-routin,
     In the occorance of interrupt
     this function will tigger.
    */
    void gpt0Isr(void)
    {
     hitIsr = TRUE;
    /// printf("ISR Success\n");
        IRQ_clear(TINT_EVENT); 
    }

    /* This is the sample test case for GPT,
       which is running with inttupt mode.
       This test case configured with Auto reload enable
       and prescale 3.

       This function returns:
       CSL_TEST_PASSED              -Success
       CSL_TEST_FAILED              -Failure
    */
    Int16 gpt_IntcSample(void)
    {
     CSL_Handle hGpt;
     CSL_Status  status;
     CSL_Config  hwConfig;
     Uint32   timeCnt1;
     Uint32   timeCnt2;
     volatile Uint16 delay;


     hitIsr = FALSE;
     status = 0;
     
     IRQ_clear(TINT_EVENT);

     hGpt = (CSL_GptObj *)GPT_open (GPT_0, &gptObj, &status);
     if((NULL == hGpt) || (CSL_SOK != status))
     {
      printf("INTC: GPT Open Failed \n");
      return (CSL_TEST_FAILED);
     }
     else
     {
      printf("INTC: GPT Open Success \n");
     }

     status = GPT_reset(hGpt);
     if(CSL_SOK != status)
     {
      printf("INTC: GPT Reset Failed \n");
      return (CSL_TEST_FAILED);
     }
     else
     {
      printf("INTC: GPT Reset Success \n");
     }

     IRQ_setVecs((Uint32)(&VECSTART));
     IRQ_plug(TINT_EVENT, &gpt0Isr);
     IRQ_enable(TINT_EVENT);
     

     hwConfig.autoLoad   = GPT_AUTO_ENABLE;
     hwConfig.ctrlTim   = GPT_TIMER_ENABLE;
     hwConfig.preScaleDiv  = GPT_PRE_SC_DIV_7; 
     hwConfig.prdLow   = 0xFFFF;
     hwConfig.prdHigh   = 0x0000;

     status =  GPT_config(hGpt, &hwConfig);
     if(CSL_SOK != status)
     {
      printf("INTC: GPT Config Failed \n");
      return (CSL_TEST_FAILED);
     }
     else
     {
      printf("INTC: GPT Config Success \n");
     }
     IRQ_globalEnable();
     status = GPT_start(hGpt);
     if(CSL_SOK != status)
     {
      printf("INTC: GPT Start Failed \n");
      return (CSL_TEST_FAILED);
     } 

     status = GPT_getCnt(hGpt, &timeCnt1);
     if(CSL_SOK != status)
     {
      printf("INTC: GPT Count-1 Failed \n");
      return (CSL_TEST_FAILED);
     }
     else
     {
      printf("INTC: GPT Count-1 Success \n");
     }

     for(delay = 0; delay < 100; delay++);

     status = GPT_getCnt(hGpt, &timeCnt2);
     if(CSL_SOK != status)
     {
      printf("INTC: GPT Count-2 Failed \n");
      return (CSL_TEST_FAILED);
     }
     else
     {
      printf("INTC: GPT Count-2 Success \n");
     }

     if(timeCnt1 == timeCnt2)
     {
      printf("INTC: GTP Time Count Compare Failed\n");
      return(CSL_TEST_FAILED);
     }
     else
     {  
      printf("INTC: GTP Time Count Compare Successful\n");
     }

     while(hitIsr != TRUE);

     IRQ_globalDisable();


     status = GPT_stop(hGpt);
     if(CSL_SOK != status)
     {
      printf("INTC: GPT Stop Failed \n");
      return (CSL_TEST_FAILED);
     }
     else
     {
      printf("INTC: GPT Stop Success \n");
     }

     status = GPT_reset(hGpt);
     
     status = GPT_close(hGpt);
     if(CSL_SOK != status)
     {
      printf("INTC: GPT Close Failed \n");
      return (CSL_TEST_FAILED);
     }
     else
     {
      printf("INTC: GPT Close Success \n");
     }

     return (CSL_TEST_PASSED);
    }


    /*
     The main function call the sample code to test.
    */
    void main()
    {
     Int16 result;

     IRQ_globalDisable();
     result = gpt_IntcSample();

     
     if(CSL_TEST_FAILED == result)
     {
      printf("INTC: Gpt Test Case Failed !!!\n");
     }
     else
     {
      printf("INTC: Gpt Test Case Passed !!!\n");
     }
     IRQ_globalDisable();
    }