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.

6713 with aic23 interrupts

Other Parts Discussed in Thread: SPRC090, CCSTUDIO

I tried to execute an example program with interrupts. I use CCS Version: 6.1.0.00104 .

I got a warning:

warning #10247-D: creating output section "vectors" without a SECTIONS

/*************************************************************************
 *    Basic stereo loop function for C6713 DSK and AIC23 codec
 *  D. Richard Brown on 9-Oct-2006
 *  Based on code from "Real-Time Digital Signal Processing Based on TMS320C6000"
 *  by N. Kehtarnavaz and N. Kim.
 *************************************************************************/

#define CHIP_6713 1

#include <stdio.h>
#include <c6x.h>
#include <csl.h>
#include <csl_mcbsp.h>
#include <csl_irq.h>

#include "dsk6713.h"
#include "dsk6713_aic23.h"

DSK6713_AIC23_CodecHandle hCodec;                            // Codec handle
DSK6713_AIC23_Config config = DSK6713_AIC23_DEFAULTCONFIG;  // Codec configuration with default settings

interrupt void serialPortRcvISR(void);

void main()
{

    DSK6713_init();        // Initialize the board support library, must be called first
    hCodec = DSK6713_AIC23_openCodec(0, &config);    // open codec and get handle

    // Configure buffered serial ports for 32 bit operation
    // This allows transfer of both right and left channels in one read/write
    MCBSP_FSETS(SPCR1, RINTM, FRM);
    MCBSP_FSETS(SPCR1, XINTM, FRM);
    MCBSP_FSETS(RCR1, RWDLEN1, 32BIT);
    MCBSP_FSETS(XCR1, XWDLEN1, 32BIT);
    
    // set codec sampling frequency
    DSK6713_AIC23_setFreq(hCodec, DSK6713_AIC23_FREQ_44KHZ);

    // interrupt setup
    IRQ_globalDisable();            // Globally disables interrupts
    IRQ_nmiEnable();                // Enables the NMI interrupt
    IRQ_map(IRQ_EVT_RINT1,15);        // Maps an event to a physical interrupt
    IRQ_enable(IRQ_EVT_RINT1);        // Enables the event
    IRQ_globalEnable();                // Globally enables interrupts

    while(1)                        // main loop - do nothing but wait for interrupts
    {
    }
}

interrupt void serialPortRcvISR()
{
    union {Uint32 combo; short channel[2];} temp;

    temp.combo = MCBSP_read(DSK6713_AIC23_DATAHANDLE);
    // Note that right channel is in temp.channel[0]
    // Note that left channel is in temp.channel[1]

    MCBSP_write(DSK6713_AIC23_DATAHANDLE, temp.combo);
}


; *************************************************************************
; *    This code is written by N. Kehtarnavaz and N. Kim as part of the
; *    textbook "Real-Time Digital Signal Processing Based on TMS320C6000".
; *************************************************************************

    .ref    _c_int00
    .ref    _serialPortRcvISR ; refer the address of ISR defined in C program

    .sect   "vectors"

RESET_RST:
    MVKL .S2 _c_int00, B0
    MVKH .S2 _c_int00, B0
    B    .S2 B0
    NOP
    NOP
    NOP
    NOP
    NOP

NMI_RST:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

RESV1:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

RESV2:
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

INT4:   NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

INT5:   NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

INT6: NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

INT7:   NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

INT8:   NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

INT9:   NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

INT10:   NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

INT11:  NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

INT12:  NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

INT13:   NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

INT14:  NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP
    NOP

INT15:
    MVKL .S2 _serialPortRcvISR, B0
    MVKH .S2 _serialPortRcvISR, B0
    B    .S2 B0
    NOP
    NOP
    NOP
    NOP
    NOP

When I debug the project, the program doesnt jump into the serialPortRcvISR.


What did I forget?

  • Hi Chris,
    Are you connected the DSP and called gel file ?
    Where did you take this code ?
    Is that reliable resource ?

    Install CSL package for C6713 and refer to the following example which is based on interrupt (ISR).

    http://www.ti.com/tool/sprc090

    C:\ti\C6xCSL\examples\c6000\dsk6713\csl\timer\timer1

  • I'm able to get into ISR routine.

    Just I imported the code from the link  you given and changed the location of LIBRARY and INCLUDE file.

    Configured the on the board emulator and got working. Thats it.

  • sill got a problem with the library

    I import the project with Import legacy ccsv3.3

    I changed the things in the pictures.

    I got the following warnings: I dont know why the compiler search in Desktop?

    Description    Resource    Path    Location    Type
    #16002-D build attribute vendor section TI missing in "C:/Users/Laptop/Desktop/CCStudio_v3.1/C6000/csl/lib/csl6713.lib<csl_irq.obj>": compatibility cannot be determined    stereoloop             C/C++ Problem
    #16002-D build attribute vendor section TI missing in "C:/Users/Laptop/Desktop/CCStudio_v3.1/C6000/csl/lib/csl6713.lib<csl_mcbsp.obj>": compatibility cannot be determined    stereoloop             C/C++ Problem
    #16002-D build attribute vendor section TI missing in "C:/Users/Laptop/Desktop/CCStudio_v3.1/C6000/csl/lib/dsk6713bsl.lib<dsk6713_aic23_opencodec.obj>": compatibility cannot be determined    stereoloop             C/C++ Problem
    #16002-D build attribute vendor section TI missing in "C:/Users/Laptop/Desktop/CCStudio_v3.1/C6000/csl/lib/dsk6713bsl.lib<dsk6713_aic23_registers.obj>": compatibility cannot be determined    stereoloop             C/C++ Problem
    #16002-D build attribute vendor section TI missing in "C:/Users/Laptop/Desktop/CCStudio_v3.1/C6000/csl/lib/dsk6713bsl.lib<dsk6713_aic23_setfreq.obj>": compatibility cannot be determined    stereoloop             C/C++ Problem
    #16002-D build attribute vendor section TI missing in "C:/Users/Laptop/Desktop/CCStudio_v3.1/C6000/csl/lib/dsk6713bsl.lib<dsk6713.obj>": compatibility cannot be determined    stereoloop             C/C++ Problem
    Invalid project path: Include path not found (C:\CCStudio_v3.1\C6000\dsk6713\include).    stereoloop        pathentry    Path Entry Problem

    when i debug the project, the program jumps only once into the ISR.

    Did I something wrong with the library?

  • i cant post the pictures

    I changed:
    Linker command file: stereoloop.cmd
    Runtime support library: C:/ti/ccsv6/tools/compiler/c6000_7.4.12/lib/rts6700.lib
    compiler include options: "C:\TI\C6xCSL\include"
    "C:\TI\DSK6713\c6000\dsk6713\include"
    "C:/CCStudio_v3.1/C6000/dsk6713/include"

    file search path
    "C:/ti/ccsv6/tools/compiler/c6000_7.4.12/lib/rts6700.lib"
    "C:\TI\C6xCSL\lib_3x\csl6713.lib"
    "C:\TI\DSK6713\c6000\dsk6713\lib\dsk6713bsl.lib"
    "C:\TI\C6xCSL\lib_3x\csl6713.lib"
  • Hi Chris,
    Nothing I changed as I told before, simply I imported and given correct library and include path then I did rebuild, after that I got working.